summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-03 15:42:49 +0900
committerJunio C Hamano <gitster@pobox.com>2017-10-03 15:42:49 +0900
commit5a5b8c1f01d8fec7ca3178d7350e87e8bbcaeec0 (patch)
tree92e7e8bc68981b4c0d97359e233ed570e650fc19
parentbb3afad386aa2852c2ea86ac50ba33e770ee7efc (diff)
parent83a17fa83b24ed713e2c2647bf89dae171971b73 (diff)
downloadgit-5a5b8c1f01d8fec7ca3178d7350e87e8bbcaeec0.tar.gz
Merge branch 'sb/test-submodule-update-config'
* sb/test-submodule-update-config: t7406: submodule.<name>.update command must not be run from .gitmodules
-rwxr-xr-xt/t7406-submodule-update.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 034914a14f..6f083c4d68 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -406,6 +406,14 @@ test_expect_success 'submodule update - command in .git/config' '
)
'
+test_expect_success 'submodule update - command in .gitmodules is ignored' '
+ test_when_finished "git -C super reset --hard HEAD^" &&
+ git -C super config -f .gitmodules submodule.submodule.update "!false" &&
+ git -C super commit -a -m "add command to .gitmodules file" &&
+ git -C super/submodule reset --hard $submodulesha1^ &&
+ git -C super submodule update submodule
+'
+
cat << EOF >expect
Execution of 'false $submodulesha1' failed in submodule path 'submodule'
EOF