* git patch format for rename
@ 2016-07-06 16:00 Nadya.Zabrodina
2016-07-06 17:45 ` Stefan Beller
0 siblings, 1 reply; 2+ messages in thread
From: Nadya.Zabrodina @ 2016-07-06 16:00 UTC (permalink / raw)
To: git; +Cc: Kirill Likhodedov
Hi,
could you please explain to me why ‘rename from & rename to’ information is added to git patch?
Here is the patch created by `git format-patch`:
diff --git a/before.txt b/after.txt
similarity index 100%
rename from before.txt
rename to after.txt
Is there any reason why git can’t recognize and apply rename-change which looks like this:
diff --git a/before.txt b/after.txt
--- a/before.txt
+++ b/after.txt
or even like this:
diff --git a/before.txt b/after.txt
I’m implementing a program (with an IDE) to create patches compatible with Git and want to have better understanding of the format and possible issues with it.
Thanks a lot in advance.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git patch format for rename
2016-07-06 16:00 git patch format for rename Nadya.Zabrodina
@ 2016-07-06 17:45 ` Stefan Beller
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Beller @ 2016-07-06 17:45 UTC (permalink / raw)
To: Nadya.Zabrodina; +Cc: git, Kirill Likhodedov
On Wed, Jul 6, 2016 at 9:00 AM, Nadya.Zabrodina@jetbrains.com
<Nadya.Zabrodina@jetbrains.com> wrote:
> Hi,
>
> could you please explain to me why ‘rename from & rename to’ information is added to git patch?
> Is there any reason why git can’t recognize and apply rename-change which looks like this:
>
> diff --git a/before.txt b/after.txt
> --- a/before.txt
> +++ b/after.txt
See https://github.com/git/git/blob/master/Documentation/diff-generate-patch.txt
for the status quo. I think most of it grew over time and made sense
at the time of implementation,
so the alternatives were maybe considered, you'd need to look for the
old discussions around
the diff format.
>
> I’m implementing a program (with an IDE) to create patches compatible with Git and want to have better understanding of the format and possible issues with it.
>
> Thanks a lot in advance.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-06 17:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06 16:00 git patch format for rename Nadya.Zabrodina
2016-07-06 17:45 ` Stefan Beller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.