summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2013-09-24 23:36:08 -0700
committerLibravatar Jonathan Nieder <jrnieder@gmail.com>2013-09-24 23:36:08 -0700
commit5636a20070c80dec23cc6d6180cb1dd958e23bca (patch)
tree78ae41beca656e291696a58addf5a597b2d42018 /t
parentMerge branch 'cc/replace-with-the-same-type' (diff)
parentImprove documentation concerning the status.submodulesummary setting (diff)
downloadtgif-5636a20070c80dec23cc6d6180cb1dd958e23bca.tar.xz
Merge branch 'bc/submodule-status-ignored'
* bc/submodule-status-ignored: Improve documentation concerning the status.submodulesummary setting submodule: don't print status output with ignore=all submodule: fix confusing variable name
Diffstat (limited to 't')
-rwxr-xr-xt/t7401-submodule-summary.sh18
-rwxr-xr-xt/t7508-status.sh4
2 files changed, 20 insertions, 2 deletions
diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh
index 5a6d6d62eb..366746f0d4 100755
--- a/t/t7401-submodule-summary.sh
+++ b/t/t7401-submodule-summary.sh
@@ -104,6 +104,24 @@ EOF
test_cmp expected actual
"
+test_expect_success 'no ignore=all setting has any effect' "
+ git config -f .gitmodules submodule.sm1.path sm1 &&
+ git config -f .gitmodules submodule.sm1.ignore all &&
+ git config submodule.sm1.ignore all &&
+ git config diff.ignoreSubmodules all &&
+ git submodule summary >actual &&
+ cat >expected <<-EOF &&
+* sm1 $head1...$head2 (1):
+ > Add foo3
+
+EOF
+ test_cmp expected actual &&
+ git config --unset diff.ignoreSubmodules &&
+ git config --remove-section submodule.sm1 &&
+ git config -f .gitmodules --remove-section submodule.sm1
+"
+
+
commit_file sm1 &&
head3=$(
cd sm1 &&
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index d8c531da76..6fb59f3293 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -1380,7 +1380,7 @@ EOF
test_i18ncmp expect output
'
-test_expect_failure '.gitmodules ignore=all suppresses submodule summary' '
+test_expect_success '.gitmodules ignore=all suppresses submodule summary' '
git config --add -f .gitmodules submodule.subname.ignore all &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status > output &&
@@ -1388,7 +1388,7 @@ test_expect_failure '.gitmodules ignore=all suppresses submodule summary' '
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_failure '.git/config ignore=all suppresses submodule summary' '
+test_expect_success '.git/config ignore=all suppresses submodule summary' '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore all &&