Re: [PATCH 1/3] submodule-config: passing name reference for .gitmodule blobs
On Thu, Jul 28, 2016 at 5:49 AM, Heiko Voigt <hvoigt@hvoigt.net> wrote:
Show 13 quoted lines
> 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>
> ---
> Here you go. Now including a test.
All 3 patches look good to me, thanks!
Show 9 quoted lines
>
> +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