From: Stefan Beller Date: Thu, 28 Jul 2016 16:26:26 GMT Subject: Re: [PATCH 1/3] submodule-config: passing name reference for .gitmodule blobs Message-ID: In-Reply-To: <20160728124910.GA2530@sandbox> On Thu, Jul 28, 2016 at 5:49 AM, Heiko Voigt wrote: > 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 > --- > Here you go. Now including a test. All 3 patches look good to me, thanks! > > +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 Makes sense!