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

Re: [RFC] adding merge-node to parent lines in a commit

From
Sean <seanlkml@sympatico.ca>
Date
May 15, 2005, 22:07 UTC
Message-ID
<1441.10.10.10.24.1116194876.squirrel@linux1>
In-Reply-To
<7vfywoqira.fsf@assigned-by-dhcp.cox.net>
On Sun, May 15, 2005 5:30 pm, Junio C Hamano said:
> It is not clear to me ID of what object is being recorded as
> SHA1-MERGE-NODE in your proposal.  Care to illustrate?
Hey Junio,
Yes, it's pretty basic unless i'm overlooking something:
Rn---\
>    Mn
>    Mn-1

Rn-1 | Rn-2 | Rn-3--/ Initial

So for this particular case it's rather simple, the Rn merge node would have:

parent Rn-1 (ommitted) parent Mn Rn-3

Essentially, you are recording in the merge commit the length of each branch that represents new commits that did not exist in this repository before this merge.

But there are more complicated cases with multiple parent merges. What this would avoid is the need to calculate common_anscestor in routines like git-rev-list, because that information would already be stored. As far as I know this information is already available at merge time anyway, so recording it shouldn't be a burden. I'm not sure it buys you a ton out the other end, but perhaps it would be slightly easier to piece the merge history back together.

Sean
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “[RFC] adding merge-node to parent lines in a commit”
  1. SeanMay 15, 2005
  2. Junio C HamanoMay 15, 2005
  3. SeanMay 15, 2005
  4. Junio C HamanoMay 15, 2005
  5. SeanMay 15, 2005

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.