submodule-config: passing name reference for .gitmodule blobs
commit514dea905a3c72c8f7268347793f2947efd547be
authorHeiko Voigt <hvoigt@hvoigt.net>
Thu, 28 Jul 2016 12:49:11 +0000 (28 14:49 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Jul 2016 20:05:14 +0000 (28 13:05 -0700)
tree8d4e54782d8bdfa4eece467e5b7a4112b0a9a560
parent508a285ceab4523412546a92cd9444f8e78065e1
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>
submodule-config.c
t/t7411-submodule-config.sh