summaryrefslogtreecommitdiff
path: root/t/t4013-diff-various.sh
diff options
context:
space:
mode:
authorMichael Spang <mspang@uwaterloo.ca>2009-02-18 06:48:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-02-18 18:55:33 (GMT)
commitd61027b21f403a74ba16191756d22717a2e95bd4 (patch)
treee40142b80501bcbed2b27931d3a1dcc263fb4b71 /t/t4013-diff-various.sh
parentbed5122f23c3584f2bae43e1af2f41fbe939c971 (diff)
downloadgit-d61027b21f403a74ba16191756d22717a2e95bd4.zip
git-d61027b21f403a74ba16191756d22717a2e95bd4.tar.gz
git-d61027b21f403a74ba16191756d22717a2e95bd4.tar.bz2
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 't/t4013-diff-various.sh')
-rwxr-xr-xt/t4013-diff-various.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index aba5320..9c70902 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -74,6 +74,10 @@ test_expect_success setup '
for i in 1 2; do echo $i; done >>dir/sub &&
git update-index file0 dir/sub &&
+ mkdir dir3 &&
+ cp dir/sub dir3/sub &&
+ test-chmtime +1 dir3/sub &&
+
git config log.showroot false &&
git commit --amend &&
git show-branch
@@ -262,6 +266,7 @@ diff --patch-with-raw -r initial..side
diff --name-status dir2 dir
diff --no-index --name-status dir2 dir
diff --no-index --name-status -- dir2 dir
+diff --no-index dir dir3
diff master master^ side
EOF