Skip to content

Commit d4147f5

Browse files
committed
diff: ignore mode in binary size optimization
This makes add/delete work. Signed-off-by: Jeff King <peff@peff.net>
1 parent 7c7698a commit d4147f5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

diff.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3714,9 +3714,7 @@ static void builtin_diff(const char *name_a,
37143714
( (!textconv_one && diff_filespec_is_binary(o->repo, one)) ||
37153715
(!textconv_two && diff_filespec_is_binary(o->repo, two)) )) {
37163716
struct strbuf sb = STRBUF_INIT;
3717-
if (!one->data && !two->data &&
3718-
S_ISREG(one->mode) && S_ISREG(two->mode) &&
3719-
!o->flags.binary) {
3717+
if (!one->data && !two->data && !o->flags.binary) {
37203718
if (oideq(&one->oid, &two->oid)) {
37213719
if (must_show_header)
37223720
emit_diff_symbol(o, DIFF_SYMBOL_HEADER,

0 commit comments

Comments
 (0)