git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Re: Bug with "git submodule update" + subrepo with differing path/name?

From
AUAndreas Urke <arurke@gmail.com>
Date
Dec 20, 2017, 08:22 UTC
Message-ID
<CAFBGMVO+P99hJ_nKgCJ4OqhMEdRdc3m8KHNS1pPrrhU_0wS6=A@mail.gmail.com>
In-Reply-To
<CAGZ79kbqntXuYuLGF7zjXfQ5X998QdEba20yy8A0cqS=DaRxFA@mail.gmail.com>
Thanks for looking into this.

I was able to reproduce it from scratch, but I followed my earlier workflow where I first created the subrepos, and then later renamed it. At the time I was not able to find any command to rename without changing the path (and I was not able find one now either, is there any?), so I edited name and path in .gitmodules and ran git submodule sync. Am I asking for trouble doing it that way?

Let me know if you need the exact steps I followed.
Andreas
On 19 December 2017 at 23:33, Stefan Beller <sbeller@google.com> wrote:
Show 29 quoted lines
> On Tue, Dec 19, 2017 at 2:19 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Stefan Beller <sbeller@google.com> writes:
>>
>>> I tried reproducing the issue (based on the `next` branch, not 2.15,
>>> but I do not recall any changes in the submodule area lately), and
>>> could not come up with a reproduction recipe,...
>>
>> I do not offhand recall anything; the closest I can think of is the
>> three-patch series <20171016135623.GA12756@book.hvoigt.net> that
>> taught the on-demand recursive fetch to pay attention to the location
>> in the superproject tree a submodule is bound to.
>
> I tried the same test on 2.15 and cannot reproduce there either.
>
>>
>>     4b4acedd61 submodule: simplify decision tree whether to or not to fetch
>>     c68f837576 implement fetching of moved submodules
>>     01ce12252c fetch: add test to make sure we stay backwards compatible
>>
>> But IIRC, "submodule update" uses a separate codepath?
>
> Yes, any portion of git-submodule.sh that calls out to C is going
> through the submodule--helper. I want to revive the port of that
> shell script to C again.
>
> The "submodule update" uses the submodule helper to obtain
> the list of submodules and then does a "git -C $sub fetch" in there.
>
> Stefan
Previous: Stefan BellerNext: Stefan Beller
Message 5 of 11 in “Bug with "git submodule update" + subrepo with differing path/name?”
  1. Andreas UrkeDec 18, 2017
  2. Re: Bug with "git submodule update" + subrepo with differing path/name?Stefan Beller, Dec 19, 2017
  3. Junio C HamanoDec 19, 2017
  4. Stefan BellerDec 19, 2017
  5. Andreas UrkeDec 20, 2017
  6. Stefan BellerDec 20, 2017
  7. Andreas UrkeDec 21, 2017
  8. Stefan BellerDec 21, 2017
  9. Andreas UrkeDec 21, 2017
  10. Stefan BellerDec 21, 2017
  11. Stefan BellerDec 21, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.