git patch format for rename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]