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

Re: [PATCH] submodule merge support

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
May 7, 2007, 16:02 UTC
Message-ID
<alpine.LFD.0.98.0705070857100.3802@woody.linux-foundation.org>
In-Reply-To
<463EFFC6.12A1B0A1@eudaptics.com>
On Mon, 7 May 2007, Johannes Sixt wrote:
> 
> I think you missed Linus's point: If the supermodule's merge leads to a
> conflict in the submodule links, it is not appropriate to merge the
> submodule.
That is true, but no, that wasn't what I was trying to say.

What I was trying to say was really that the merge-base in the super-module is simply totally irrelevant to the sub-module, and any merge at all that thinks it is is obviously broken.

Now, for a _normal_ merge (with just a single merge-base), this is not an issue, since the proposed submodule merger wouldn't care about the supermodule merge base anyway.

But if you have multiple merge-bases and you do a recursive merge to create a new *combined* merge-base, trying to do that for the submodule is just pointless. You shouldn't. The merge-base for the submodule will be irrelevant for the final merge *anyway* (since the submodule history comes from itself), so in a recursive sub-merge, you shouldn't even *try* to merge the submodule. The end result would never be used anyway, and the only thing you can do is make for more complexity.

So not doing it in the low-level merger is right - because it is simply irrelevant at that stage. The low-level merger might as well ignore submodules.

I think.
			Linus
Previous: Johannes SixtNext: Martin Waitz
Message 7 of 10 in “submodule merge support”
  1. submodule merge supportMartin Waitz, May 6, 2007
  2. Alex RiesenMay 6, 2007
  3. Martin WaitzMay 6, 2007
  4. Linus TorvaldsMay 6, 2007
  5. Martin WaitzMay 7, 2007
  6. Johannes SixtMay 7, 2007
  7. Linus TorvaldsMay 7, 2007
  8. Martin WaitzMay 7, 2007
  9. Martin WaitzMay 7, 2007
  10. Martin WaitzMay 7, 2007

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.