Re: rename tracking and file-name swapping

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

 



Yuri D'Elia <wavexx@xxxxxxxxxxxx> writes:

> Hi everyone. Does rename tracking recognize two file names being swapped?
>
> % ls -l
> total 24
> -rw-rw-r--   1 wavexx  wavexx  5952 Sep 13 13:09 file1.txt
> -rw-rw-r--   1 wavexx  wavexx  3330 Sep 13 13:09 file2.txt
> % mv file1.txt file3.txt 
> % mv file2.txt file1.txt
> % mv file3.txt file2.txt
> % git add file1.txt file2.txt 
> % git diff -M --stat --cached
>  file1.txt |  150 +++++++++++++++++++++++-------------------------------------
>  file2.txt |  150 +++++++++++++++++++++++++++++++++++++-----------------------
>  2 files changed, 150 insertions(+), 150 deletions(-)

By default, if the pathname that was present in the old version still
appears in the new version, that path is not considered as a candiate
for rename detection.  Only "X used to be there but is gone" and "Y did
not exist but appeared" are paired up and checked if they are similar.

Give the command -B option, too, to break the filepair that does not
disappear.
--
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]