diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-10-23 10:02:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-10-23 16:17:09 -0700 |
commit | 6936b5859c47b826437218fbfc0e2bc0935f7136 (patch) | |
tree | f05f934803310b14adf24f9e44d7c000a87c753a /git-archimport.perl | |
parent | git-tag.txt: Add a missing hyphen to `-s` (diff) | |
download | tgif-6936b5859c47b826437218fbfc0e2bc0935f7136.tar.xz |
diff -B -M: fix output for "copy and then rewrite" case
Starting from a single file, A, if you create B as a copy of A (and
possibly make some edit) and then make extensive change to A, you
will see:
$ git diff -C --name-status
C89 A B
M A
which is expected. However, if you ask the same question in a
different way, you see this:
$ git diff -B -M --name-status
R89 A B
M100 A
telling us that A was rename-edited into B (as if "A will no longer
exist as the result") and at the same time A itself was extensively
edited.
In this case, because the resulting tree still does have file A
(even if it has contents vastly different from the original), we
should use "C"opy, not "R"ename, to avoid hinting that A somehow
goes away.
Two existing tests were depending on the wrong behaviour, and fixed.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-archimport.perl')
0 files changed, 0 insertions, 0 deletions