sorry for the late reply, just stumpled upon this.
On Mon, Jul 31, 2017 at 01:43:04PM -0700, Stefan Beller wrote:
> On Sun, Jul 30, 2017 at 6:43 AM, Jens Lehmann <jens.lehm...@web.de> wrote:
> > Am 26.07.2017 um 23:06 schrieb Junio C Hamano:
> >> Stefan Beller <sbel...@google.com> writes:
> >>> Rereading the archives, there was quite some discussion on the design
> >>> of these patches, but these lines of code did not get any attention
> >>> https://public-inbox.org/git/4cdb3063.5010...@web.de/
> >>> I cc'd Jens in the hope of him having a good memory why he
> >>> wrote the code that way. :)
> >> Thanks for digging. I wouldn't be surprised if this were a fallback
> >> to help a broken entry in .gitmodules that lack .path variable, but
> >> we shouldn't be sweeping the problem under the rug like that.
> > Sorry to disappoint you ;-) I added this in 7dce19d374 because
> > submodule by path lookup back then only parsed the checked out
> > .gitmodules file.
> This is still the case AFAICT, as we never ask for a specific .gitmodules
> file identified by sha1 of the commit.
This was actually part of my original approach but it seems I never got
around to implement that last part for which I originally started the
submodule config API: Proper recursive fetch.
I still have a patch for moved submodules lying around which pass a commit id
for a gitmodules file. That particular patch is quite simple and finished but
I was planning to include that in the finished fetch series. So I can have a
look if I can quickly update that to the current state, so we can at least have
one proper user of the submodule config API.
> > So looking for it by name was a good guess to
> > fetch a new submodule that wasn't present in the current HEAD's
> > .gitmodules, as the path is used as the default name in "git
> > submodule add".
I will have a look whether we can easily replace this hack with the proper
lookup now. Lets see how many low hanging fruits we have lying around
for recursive fetch. The full blown implementation including cloning of
new submodules might still take some time...