diff options
| author | Junio C Hamano <gitster@pobox.com> | 2016-08-03 15:10:28 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-08-03 15:10:28 -0700 |
| commit | f4fa8a9b18a840539edf908bb82b54c5f82aab31 (patch) | |
| tree | aef921c8cf130e9f32b9209dcdacc7df84d0783b /t | |
| parent | Merge branch 'jk/push-progress' (diff) | |
| parent | submodule-config: fix test binary crashing when no arguments given (diff) | |
| download | git-f4fa8a9b18a840539edf908bb82b54c5f82aab31.tar.gz git-f4fa8a9b18a840539edf908bb82b54c5f82aab31.zip | |
Merge branch 'rs/submodule-config-code-cleanup'
Code cleanup.
* rs/submodule-config-code-cleanup:
submodule-config: fix test binary crashing when no arguments given
submodule-config: combine early return code into one goto
submodule-config: passing name reference for .gitmodule blobs
submodule-config: use explicit empty string instead of strbuf in config_from()
Diffstat (limited to 't')
| -rw-r--r-- | t/helper/test-submodule-config.c | 2 | ||||
| -rwxr-xr-x | t/t7411-submodule-config.sh | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/t/helper/test-submodule-config.c b/t/helper/test-submodule-config.c index 61049b87a0..2f144d539a 100644 --- a/t/helper/test-submodule-config.c +++ b/t/helper/test-submodule-config.c @@ -23,7 +23,7 @@ int cmd_main(int argc, const char **argv) arg++; my_argc--; - while (starts_with(arg[0], "--")) { + while (arg[0] && starts_with(arg[0], "--")) { if (!strcmp(arg[0], "--url")) output_url = 1; if (!strcmp(arg[0], "--name")) diff --git a/t/t7411-submodule-config.sh b/t/t7411-submodule-config.sh index fc97c3314e..400e2b1439 100755 --- a/t/t7411-submodule-config.sh +++ b/t/t7411-submodule-config.sh @@ -82,6 +82,17 @@ test_expect_success 'error in one submodule config lets continue' ' ) ' +test_expect_success 'error message contains blob reference' ' + (cd super && + sha1=$(git rev-parse HEAD) && + test-submodule-config \ + HEAD b \ + HEAD submodule \ + 2>actual_err && + grep "submodule-blob $sha1:.gitmodules" actual_err >/dev/null + ) +' + cat >super/expect_url <<EOF Submodule url: 'git@somewhere.else.net:a.git' for path 'b' Submodule url: 'git@somewhere.else.net:submodule.git' for path 'submodule' |
