summaryrefslogtreecommitdiff
path: root/t/t4027-diff-submodule.sh
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2010-08-05 23:27:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-09 16:11:50 (GMT)
commit90e14525f22c2980d4375dcb5d79e6d5da293a78 (patch)
tree766a64f6cf10599f5fa877ce5010a4a076c49bce /t/t4027-diff-submodule.sh
parentbe4f2b408e5a00d123a0ecb04b0c6c48be71dfa1 (diff)
downloadgit-90e14525f22c2980d4375dcb5d79e6d5da293a78.zip
git-90e14525f22c2980d4375dcb5d79e6d5da293a78.tar.gz
git-90e14525f22c2980d4375dcb5d79e6d5da293a78.tar.bz2
Add tests for the diff.ignoreSubmodules config option
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4027-diff-submodule.sh')
-rwxr-xr-xt/t4027-diff-submodule.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/t4027-diff-submodule.sh b/t/t4027-diff-submodule.sh
index 1bc6e77..d99814a 100755
--- a/t/t4027-diff-submodule.sh
+++ b/t/t4027-diff-submodule.sh
@@ -115,6 +115,9 @@ test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match)'
'
test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match) [.git/config]' '
+ git config diff.ignoreSubmodules all &&
+ git diff HEAD >actual &&
+ ! test -s actual &&
git config submodule.subname.ignore none &&
git config submodule.subname.path sub &&
git diff HEAD >actual &&
@@ -136,10 +139,14 @@ test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match)
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
test_cmp expect.body actual.body &&
- git config --remove-section submodule.subname
+ git config --remove-section submodule.subname &&
+ git config --unset diff.ignoreSubmodules
'
test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match) [.gitmodules]' '
+ git config diff.ignoreSubmodules dirty &&
+ git diff HEAD >actual &&
+ ! test -s actual &&
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sub &&
git diff HEAD >actual &&
@@ -166,6 +173,7 @@ test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match)
test_cmp expect.body actual.body &&
git config --remove-section submodule.subname &&
git config --remove-section -f .gitmodules submodule.subname &&
+ git config --unset diff.ignoreSubmodules &&
rm .gitmodules
'