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

submodule modify/delete wrong message

From
David Turner <novalis@novalis.org>
Date
Dec 4, 2017, 21:39 UTC
Message-ID
<1512423580.9882.405.camel@novalis.org>

When merging with a submodule modify/delete conflict (i.e. I've deleted the submodule, and I'm merging in a branch that modified it), git lies about what it is doing:

"CONFLICT (modify/delete): submodule deleted in HEAD and modified in submodules. Version submodules of submodule left in tree at submodule~submodules. Automatic merge failed; fix conflicts and then commit the result."

In fact, the working tree does not contain anything named 'submodule~submodules'.

In addition, I would ordinarily resolve a conflict like this by using 'git rm'. Here, this gives a warning:

$ git rm submodule submodule: needs merge rm 'submodule' warning: Could not find section in .gitmodules where path=submodule

Git's behavior here is significantly better than liggit2's (which tries to check out 'submodule' as if it were a blob, and fails to do so), but it's still confusing.

It's not clear to me what the correct behavior is here. Maybe it's sufficient to just fix the message?

Next: Stefan Beller
Message 1 of 3 in “submodule modify/delete wrong message”
  1. David TurnerDec 4, 2017
  2. Stefan BellerDec 11, 2017
  3. David TurnerDec 11, 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.