diff options
author | Michael Spang <mspang@uwaterloo.ca> | 2009-02-18 01:48:06 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-18 10:55:33 -0800 |
commit | d61027b21f403a74ba16191756d22717a2e95bd4 (patch) | |
tree | e40142b80501bcbed2b27931d3a1dcc263fb4b71 /diff-no-index.c | |
parent | bed5122f23c3584f2bae43e1af2f41fbe939c971 (diff) | |
download | git-d61027b21f403a74ba16191756d22717a2e95bd4.tar.gz git-d61027b21f403a74ba16191756d22717a2e95bd4.tar.xz |
Skip timestamp differences for diff --no-index
We display empty diffs for files whose timestamps have changed.
Usually, refreshing the index makes those empty diffs go away.
However, when not using the index they are not very useful and
there is no option to suppress them.
This forces on the skip_stat_unmatch option for diff --no-index,
suppressing any empty diffs. This option is also used for diffs
against the index when "diff.autorefreshindex" is set, but that
option does not apply to diff --no-index.
Signed-off-by: Michael Spang <mspang@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-no-index.c')
-rw-r--r-- | diff-no-index.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/diff-no-index.c b/diff-no-index.c index 60ed17470..2d541d9ab 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -247,6 +247,7 @@ void diff_no_index(struct rev_info *revs, else revs->diffopt.paths = argv + argc - 2; revs->diffopt.nr_paths = 2; + revs->diffopt.skip_stat_unmatch = 1; DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS); DIFF_OPT_SET(&revs->diffopt, NO_INDEX); |