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

Re: If a branch moves a submodule, "merge --ff[-only]" succeeds while "merge --no-ff" fails with conflicts

From
Dakota Hawkins <dakotahawkins@gmail.com>
Date
Sep 10, 2016, 00:17 UTC
Message-ID
<CAG0BQX=ym399NzJZWk=emKfsPqKztDBeYS4+GXpYKhcTmtkJTQ@mail.gmail.com>
In-Reply-To
<CAGZ79kapz7PR7vO2oyWE8WygXr+hTSJeZfZgpyeERv+Z1jTjCQ@mail.gmail.com>
Show 6 quoted lines
> As you know currently the checkout doesn't touch submodules, i.e.
> you have to run "git submodule update" whenever the submodule
> changes. So when you checkout a different part of history, that moved
> a submodule, this will fail as the submodule still resides at the old
> place (and may have path name conflict with another thing)
> and is not there at the new place.

I _think_ (may be wrong) that you can reproduce this without ever updating the submodules at all. I may be missing/forgetting something in my config: I normally have global post-checkout and post-merge hooks to run a submodule update, however I realized that and (I think) disabled them for the second more concise reproduction I sent. I moved them to a "no" subdirectory in my hook directory -- git doesn't recursively look for hooks, does it? Anyway, I don't think that's a difference in my case. It may be, I agree, if you happen to be reproducing this issue locally in your working repository for some reason.

That thought process makes sense to me because as I mentioned initially these failures presented on our remote (bitbucket server, if it matters) for a pull-request merge. I don't know for certain but I don't believe the server's copy of the repo would need to update the submodules at all, ever.

Show 6 quoted lines
>>
>> Also, I'm not too familiar/comfortable with mailing list etiquette,
>> and I don't want to be a bother by continuing to ping this thread.
>
> Pinging is fine, as it is rather easy to ignore mails on a mailing list. ;)
> I just don't know if it increases likelihood of someone responding.
Apparently it got you on the hook! Thanks for taking the bait :)
Dakota
Previous: Stefan Beller
Message 7 of 7 in “If a branch moves a submodule, "merge --ff[-only]" succeeds while "merge --no-ff" fails with conflicts”
  1. Dakota HawkinsSep 2, 2016
  2. Dakota HawkinsSep 6, 2016
  3. Stefan BellerSep 6, 2016
  4. Dakota HawkinsSep 6, 2016
  5. Dakota HawkinsSep 9, 2016
  6. Stefan BellerSep 9, 2016
  7. Dakota HawkinsSep 10, 2016

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.