Skip to content

Commit

Permalink
diff Porcelain: do not disable auto index refreshing on -C -C
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Sep 7, 2008
1 parent f88d225 commit 9d86535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -3394,7 +3394,7 @@ void diffcore_std(struct diff_options *options)
if (DIFF_OPT_TST(options, QUIET))
return;

if (options->skip_stat_unmatch && !DIFF_OPT_TST(options, FIND_COPIES_HARDER))
if (options->skip_stat_unmatch)
diffcore_skip_stat_unmatch(options);
if (options->break_opt != -1)
diffcore_break(options->break_opt);
Expand Down

0 comments on commit 9d86535

Please sign in to comment.