summaryrefslogtreecommitdiff
path: root/src/diff_print.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-06-18 16:14:35 -0700
committerRussell Belfer <rb@github.com>2013-06-18 16:14:35 -0700
commite4acc3ba19838d39123131d4cc7e52f222691445 (patch)
treefb844930bf59730c32eeba739b97efe85df0b50c /src/diff_print.c
parent3b334075c909f9023f5f704469965cf774efc4a5 (diff)
downloadlibgit2-e4acc3ba19838d39123131d4cc7e52f222691445.tar.gz
Fix rename looped reference issues
This makes the diff rename tracking code more careful about the order in which it processes renames and more thorough in updating the mapping of correct renames when an earlier rename update alters the index of a later matched pair.
Diffstat (limited to 'src/diff_print.c')
-rw-r--r--src/diff_print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/diff_print.c b/src/diff_print.c
index 30f221a62..0de548813 100644
--- a/src/diff_print.c
+++ b/src/diff_print.c
@@ -46,7 +46,7 @@ static char diff_pick_suffix(int mode)
{
if (S_ISDIR(mode))
return '/';
- else if (mode & 0100) //-V536
+ else if (mode & 0100) /* -V536 */
/* in git, modes are very regular, so we must have 0100755 mode */
return '*';
else
@@ -162,7 +162,7 @@ static int diff_print_one_raw(
if (delta->similarity > 0)
git_buf_printf(out, "%03u", delta->similarity);
- if (delta->status == GIT_DELTA_RENAMED || delta->status == GIT_DELTA_COPIED)
+ if (delta->old_file.path != delta->new_file.path)
git_buf_printf(
out, "\t%s %s\n", delta->old_file.path, delta->new_file.path);
else