From 1a05ec6adbd4066fd7ee14bc06128eb554b4a539 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 21 Jun 2016 15:06:14 -0400 Subject: [PATCH] diff: ignore mode in binary size optimization This makes add/delete work. Signed-off-by: Jeff King --- diff.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/diff.c b/diff.c index dceac20d18f03d..53daa2fb2ca642 100644 --- a/diff.c +++ b/diff.c @@ -3657,9 +3657,7 @@ static void builtin_diff(const char *name_a, ( (!textconv_one && diff_filespec_is_binary(o->repo, one)) || (!textconv_two && diff_filespec_is_binary(o->repo, two)) )) { struct strbuf sb = STRBUF_INIT; - if (!one->data && !two->data && - S_ISREG(one->mode) && S_ISREG(two->mode) && - !o->flags.binary) { + if (!one->data && !two->data && !o->flags.binary) { if (oideq(&one->oid, &two->oid)) { if (must_show_header) emit_diff_symbol(o, DIFF_SYMBOL_HEADER,