aboutsummaryrefslogtreecommitdiff
path: root/t/t7400-submodule-basic.sh
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2007-09-08 12:30:22 +0200
committerJunio C Hamano <gitster@pobox.com>2007-09-09 02:28:57 -0700
commit5701115aa7cfe7edd57c2483085456a37e27a5ba (patch)
tree9f7870a1f59c7a789b4d3a8845fb264dcdea940b /t/t7400-submodule-basic.sh
parenta51cdb0c0420ee3bef26bbd1a9aa75e1d464e5b7 (diff)
downloadgit-5701115aa7cfe7edd57c2483085456a37e27a5ba.tar.gz
git-5701115aa7cfe7edd57c2483085456a37e27a5ba.tar.xz
git-diff: don't squelch the new SHA1 in submodule diffs
The code to squelch empty diffs introduced by commit fb13227e089f22dc31a3b1624559153821056848 would inadvertently populate filespec "two" of a submodule change using the uninitialized (null) SHA1, thereby replacing the submodule SHA1 by 0{40} in the output. This change teaches diffcore_skip_stat_unmatch to handle submodule changes correctly. Signed-off-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-xt/t7400-submodule-basic.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 9d142ed64..4fe3a41f0 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -152,6 +152,10 @@ test_expect_success 'the --cached sha1 should be rev1' '
git-submodule --cached status | grep "^+$rev1"
'
+test_expect_success 'git diff should report the SHA1 of the new submodule commit' '
+ git-diff | grep "^+Subproject commit $rev2"
+'
+
test_expect_success 'update should checkout rev1' '
git-submodule update &&
head=$(cd lib && git rev-parse HEAD) &&