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