Browse Source

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>
maint
Junio C Hamano 19 years ago
parent
commit
53dd8a9cb5
  1. 2
      builtin-diff.c

2
builtin-diff.c

@ -133,7 +133,7 @@ static int builtin_diff_blobs(struct rev_info *revs, @@ -133,7 +133,7 @@ static int builtin_diff_blobs(struct rev_info *revs,
stuff_change(&revs->diffopt,
mode, mode,
blob[0].sha1, blob[1].sha1,
blob[0].name, blob[0].name);
blob[0].name, blob[1].name);
diffcore_std(&revs->diffopt);
diff_flush(&revs->diffopt);
return 0;

Loading…
Cancel
Save