Merge branch 'sb/test-submodule-update-config'

* sb/test-submodule-update-config:
  t7406: submodule.<name>.update command must not be run from .gitmodules
maint
Junio C Hamano 2017-10-03 15:42:49 +09:00
commit 5a5b8c1f01
1 changed files with 8 additions and 0 deletions

View File

@ -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