summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorLibravatar René Scharfe <rene.scharfe@lsrfire.ath.cx>2007-08-15 00:41:00 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-08-14 22:34:58 -0700
commit6d2d9e8666ef72c8878af4822e243ca33b6752a0 (patch)
tree6e6eadfb76d10fdc5bc6e57286fabf5814d900d0 /diff.h
parentUse xmkstemp() instead of mkstemp() (diff)
downloadtgif-6d2d9e8666ef72c8878af4822e243ca33b6752a0.tar.xz
diff: squelch empty diffs even more
When we compare two non-tracked files, or explicitly specify --no-index, the suggestion to run git-status is not helpful. The patch adds a new diff_options bitfield member, no_index, that is used instead of the special value of -2 of the rev_info field max_count to indicate that the index is not to be used. This makes it possible to pass that flag down to diffcore_skip_stat_unmatch(), which only has one diff_options parameter. This could even become a cleanup if we removed all assignments of max_count to a value of -2 (viz. replacement of a magic value with a self-documenting field name) but I didn't dare to do that so late in the rc game.. The no_index bit, if set, then tells diffcore_skip_stat_unmatch() to not account for any skipped stat-mismatches, which avoids the suggestion to run git-status. Signed-off-by: Rene Scharfe <rene.scharfe@lsfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index de21f8ecd0..4546aad219 100644
--- a/diff.h
+++ b/diff.h
@@ -60,6 +60,7 @@ struct diff_options {
color_diff_words:1,
has_changes:1,
quiet:1,
+ no_index:1,
allow_external:1,
exit_with_status:1;
int context;