Skip to content

Commit 9d86535

Browse files
committed
diff Porcelain: do not disable auto index refreshing on -C -C
When we enabled the automatic refreshing of the index to "diff" Porcelain, we disabled it when --find-copies-harder was asked, but there is no good reason to do so. In the following command sequence, the first "diff" shows an "empty" diff exposing stat dirtyness, while the second one does not. $ >foo $ git add foo $ touch foo $ git diff -C -C $ git diff -C This fixes the inconsistency. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent f88d225 commit 9d86535

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3394,7 +3394,7 @@ void diffcore_std(struct diff_options *options)
33943394
if (DIFF_OPT_TST(options, QUIET))
33953395
return;
33963396

3397-
if (options->skip_stat_unmatch && !DIFF_OPT_TST(options, FIND_COPIES_HARDER))
3397+
if (options->skip_stat_unmatch)
33983398
diffcore_skip_stat_unmatch(options);
33993399
if (options->break_opt != -1)
34003400
diffcore_break(options->break_opt);

0 commit comments

Comments
 (0)