diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-17 14:38:16 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-17 14:38:17 -0700 |
commit | f2c96ceb57afd8c64c3e3e656f9390c95e9fbec9 (patch) | |
tree | b791b78d9dd9edb23dff810c1275b6f27671f742 /t/t7400-submodule-basic.sh | |
parent | edec3709db124a96134a64d8fd1117ca50f90f7c (diff) | |
parent | c66410ed32a807cefca6f679ad5583eda2e9527b (diff) | |
download | git-f2c96ceb57afd8c64c3e3e656f9390c95e9fbec9.tar.gz |
Merge branch 'sb/submodule-init'
Update of "git submodule" to move pieces of logic to C continues.
* sb/submodule-init:
submodule init: redirect stdout to stderr
submodule--helper update-clone: abort gracefully on missing .gitmodules
submodule init: fail gracefully with a missing .gitmodules file
submodule: port init from shell to C
submodule: port resolve_relative_url from shell to C
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-x | t/t7400-submodule-basic.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index d48d63a6fd..90d80d369c 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -18,6 +18,22 @@ test_expect_success 'setup - initial commit' ' git branch initial ' +test_expect_success 'submodule init aborts on missing .gitmodules file' ' + test_when_finished "git update-index --remove sub" && + git update-index --add --cacheinfo 160000,$(git rev-parse HEAD),sub && + # missing the .gitmodules file here + test_must_fail git submodule init 2>actual && + test_i18ngrep "No url found for submodule path" actual +' + +test_expect_success 'submodule update aborts on missing .gitmodules file' ' + test_when_finished "git update-index --remove sub" && + git update-index --add --cacheinfo 160000,$(git rev-parse HEAD),sub && + # missing the .gitmodules file here + git submodule update sub 2>actual && + test_i18ngrep "Submodule path .sub. not initialized" actual +' + test_expect_success 'configuration parsing' ' test_when_finished "rm -f .gitmodules" && cat >.gitmodules <<-\EOF && |