Fix copy marking from diffcore-rename.

When (A,B) ==> (B,C) rename-copy was detected, we incorrectly said
that C was created by copying B.  This is because we only check if the
path of rename/copy source still exists in the resulting tree to see
if the file is renamed out of existence.  In this case, the new B is
created by copying or renaming A, so the original B is lost and we
should say C is a rename of B not a copy of B.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2005-09-10 12:42:32 -07:00
parent b779d5f009
commit 6bac10d89d
2 changed files with 39 additions and 5 deletions

4
diff.c
View File

@ -955,7 +955,9 @@ static void diff_resolve_rename_copy(void)
}
/* See if there is some other filepair that
* copies from the same source as us. If so
* we are a copy. Otherwise we are a rename.
* we are a copy. Otherwise we are either a
* copy if the path stays, or a rename if it
* does not, but we already handled "stays" case.
*/
for (j = i + 1; j < q->nr; j++) {
pp = q->queue[j];