diff options
author | Heiko Voigt <hvoigt@hvoigt.net> | 2016-07-28 14:49:11 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-28 22:05:14 +0200 |
commit | 514dea905a3c72c8f7268347793f2947efd547be (patch) | |
tree | 8d4e54782d8bdfa4eece467e5b7a4112b0a9a560 /t/t7411-submodule-config.sh | |
parent | submodule-config: use explicit empty string instead of strbuf in config_from() (diff) | |
download | git-514dea905a3c72c8f7268347793f2947efd547be.tar.xz git-514dea905a3c72c8f7268347793f2947efd547be.zip |
submodule-config: passing name reference for .gitmodule blobs
Commit 959b5455 (submodule: implement a config API for lookup of
.gitmodules values, 2015-08-18) implemented the initial version of the
submodule config cache. During development of that initial version we
extracted the function gitmodule_sha1_from_commit(). During that process
we missed that the strbuf rev was still used in config_from() and now is
left empty. Lets fix this by also returning this string.
This means that now when reading .gitmodules from revisions, the error
messages also contain a reference to the blob they are from.
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7411-submodule-config.sh')
-rwxr-xr-x | t/t7411-submodule-config.sh | 11 |
1 files changed, 11 insertions, 0 deletions
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' |