@matheusbsbs / matheus-bagliano / commits / 53dd8a9cb5
Fork 0

Show both blob names from "git diff blob1 blob2"

Earlier we deliberately showed only blob1's name because showing both names labeled the output as a renaming patch. Now the output routine (namely, diff.c::resolve_rename_copy()) is taught not to use pathname comparison to tell if a filepair is a rename, we can safely do this change. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Aug 3, 2006 at 11:57 UTC 53dd8a9cb524ac2bd99072d86ee31ee48c99d0be
1 file changed +1 -1
builtin-diff.c
+1 -1
@@ -133,7 +133,7 @@ static int builtin_diff_blobs(struct rev_info *revs,
133 stuff_change(&revs->diffopt,
134 mode, mode,
135 blob[0].sha1, blob[1].sha1,
136 - blob[0].name, blob[0].name);
136 + blob[0].name, blob[1].name);
137 diffcore_std(&revs->diffopt);
138 diff_flush(&revs->diffopt);
139 return 0;