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

Re: Octopus merge: unique (?) to git, but is it useful?

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jun 3, 2008, 19:54 UTC
Message-ID
<alpine.LFD.1.10.0806031244290.3473@woody.linux-foundation.org>
In-Reply-To
<200806030932.03051.jnareb@gmail.com>
On Tue, 3 Jun 2008, Jakub Narebski wrote:
Show 7 quoted lines
> On Tue, 3 June 2008, Linus Torvalds wrote:
> > 
> > Once you have 0, 1 or 2 parents, the logical progression is "many". 
> 
> Well, it of course depends on design.  For example Mercurial (from what
> I have read in the documentation) has fixed width (two element) parents
> array in revflog structure.
Sure. And git very much on purpose made all basic data structures be text. 
I'm a UNIX weenie, not some VMS hack. Fixed-sized records are evil.
[ Yes, I made the hashes fixed-size binary blobs in the tree object. In 
  retrospect, that was probably a mistake. Not a huge one, but it's one of 
  the few things in the basic data structure that I'm sorry for. It 
  seemed to make sense at the time. ]

I do like how you can have arbitrary parenthood (well, arbitrary on a data structure level - we do restrict it in practice). Maybe it's not a hugely important thing, but it does allow more than just plain merges.

IOW, I could well imagine having an extra parent pointer that is not a "data merge" pointer, but a "concept merge" - you could have branches that have commits that point back to not the data in the tree, but to particular commits in another branch.

One of the things I could imagine using git for is to have "annotation branches" for things like code review etc. They'd be a real branch in their own right and with their own history, but at the same time they could well want to point back to the "code branch" that they annotate by considering that another parent in a "non-data merge" (and yes, you'd obviously have to use a special merge strategy for things like that, but you'd likely integrate it in some "annotation tool chain" rather than anything else).

			Linus
Previous: Junio C HamanoNext: Jakub Narebski
Message 23 of 30 in “Octopus merge: unique (?) to git, but is it useful?”
  1. Jakub NarebskiJun 3, 2008
  2. Linus TorvaldsJun 3, 2008
  3. Junio C HamanoJun 3, 2008
  4. Junio C HamanoJun 3, 2008
  5. Johannes SchindelinJun 3, 2008
  6. Junio C HamanoJun 3, 2008
  7. Johannes SchindelinJun 3, 2008
  8. SZEDER GáborJun 3, 2008
  9. Junio C HamanoJun 3, 2008
  10. SZEDER GáborJun 3, 2008
  11. Junio C HamanoJun 3, 2008
  12. SZEDER GáborJun 3, 2008
  13. Jeff KingJun 4, 2008
  14. Junio C HamanoJun 4, 2008
  15. Linus TorvaldsJun 3, 2008
  16. Miklos VajnaJun 3, 2008
  17. Junio C HamanoJun 4, 2008
  18. Junio C HamanoJun 3, 2008
  19. Jakub NarebskiJun 3, 2008
  20. Junio C HamanoJun 3, 2008
  21. Jakub NarebskiJun 3, 2008
  22. Junio C HamanoJun 3, 2008
  23. Linus TorvaldsJun 3, 2008
  24. Commit annotations (was:: Octopus merge: unique (?) to git, but is it useful?)Jakub Narebski, Jun 3, 2008
  25. Johannes SchindelinJun 3, 2008
  26. Johan HerlandJun 3, 2008
  27. Daniel VilleneuveJun 3, 2008
  28. Matthieu MoyJun 3, 2008
  29. Jakub NarebskiJun 3, 2008
  30. Matthieu MoyJun 3, 2008

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.