Re: [PATCH v2 04/13] Teach rebase interactive the mark command
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 30, 2008, 01:23 UTC
- Message-ID
- <7v1w4o3zle.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.DEB.1.00.0804300016130.17469@eeepc-johanness>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 13 quoted lines
> On Tue, 29 Apr 2008, Junio C Hamano wrote: >> Perhaps it would help to go back to the message J6t incompletely quoted, >> and try the example with the parent order of Y swapped (i.e. B == Y^2, C >> == Y^1) >> >> Recreating X and Y both need to refer to the rewritten B as the >> parameter to "merge" insn. You create X first then you cannot refer to >> B anymore to recreate Y. The other way around you cannot name B to >> recreate X. > > If you refer to "B" as the "short name of the original commit which refers > to the rewritten commit as soon as B was rewritten", then I really do not > see the problem.
Hmmm. Perhaps you are thinking about using not just A, B, C but also names like X, Y, and Z in the insn sequence? I was operating under the impression that you used only single parent commits to name things, and a name will stand for the result of the last operation that used the name (e.g. after "pick B", B names the result of cherry-picking the original B to detached HEAD).
A
/ \
/ X
/ / \
O---B Z
\ \ /
\ Y
\ /
C X = checkout A, merge B
Y = checkout C, merge B
Z = checkout X, merge YI start from Q, create A', B' and C' with:
reset Q
pick A
reset Q
pick B
reset Q
pick CThen I can recreate X by doing
reset A
merge BThe problem I had was to figure out the way to go back to "rewritten X". I assumed you would say "B" because that is the last insn in the sequence that used that name.
But instead you are thinking of letting me just say "X", and somehow make the machinery guess by noticing "Ah, original X is a merge between original A and B, and we have a merge between rewritten A and rewritten B, so we will treat that merge as rewritten "X"?
I actually was hoping we could avoid that, which feels messy.
But now I may be misunderstanding what you meant to say.