Re: Heads up: major rebase -i -p rework coming up

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Schindelin
Date: Saturday, January 24, 2009 - 7:23 pm

Hi,

On Sat, 24 Jan 2009, Junio C Hamano wrote:


But that is not what rebase -i is about!  Either you rewrite a commit, or 
you don't.  You don't rewrite it multiple times _and_ reference all of the 
intermediate steps!

Should you suggest that this is a sane worflow, you would really ask for 
trouble.

As it is, "mark" is useless.  It would give one and the same thing two 
names, one short SHA-1, and one numeric value, and the relationship 
between the two -- even if they mean the same! -- would be completely 
arbitrary.


Exactly!


Not exactly true, as you could split a patch by

	edit abcdefg Patch to be split
	edit abcdefg Patch to be split

And removing half of the patch in the first edit (e.g. by "git reset 
HEAD^ && git add -e" or something similar).


... or goto $ONTO...


It will use $ONTO.


You can, by doing the sane thing and first apply one strand of the two 
branches, then going back and applying the other strand.  You would not 
even once need "goto A'".


Your example seems a little bit constructed to the purpose of showing the 
shortcomings of the A' notation.

But it has a shortcoming in and of its own: if you want to apply A for 
both branches, it would make a metric ton more sense to apply A before 
branching:

   ---o---A---B---C
           \       \
            D-------O

Besides, if you would concoct a real obscure situation where you really 
needed to apply one and the same patch twice, _and_ refer to both "A'" 
(something like

   ---o---B---A---C----H
       \       \ /    /
        \       E    /
         \          /
           D---A---F
                \ /
                 G

Then you could still do the part B...C first (with the first version of 
A'), then D...F (with the second version of A') and be done with it.  
Unless you would want anything like


 C---A---B
        /
    ---A

which is ugly beyond belief IMO, but in which case you could _still_ do it 
with an "edit C; merge A' was B" where you just git cherry-pick A.

So it is possible, even if it needs trickery, which is okay IMHO as this 
is not the common case.  And I want to optimize for the common case.

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Heads up: major rebase -i -p rework coming up, Johannes Schindelin, (Sat Jan 24, 1:25 pm)
Re: Heads up: major rebase -i -p rework coming up, Junio C Hamano, (Sat Jan 24, 1:37 pm)
Re: Heads up: major rebase -i -p rework coming up, Johannes Schindelin, (Sat Jan 24, 2:04 pm)
Re: Heads up: major rebase -i -p rework coming up, Johannes Schindelin, (Sat Jan 24, 2:09 pm)
Re: Heads up: major rebase -i -p rework coming up, Thomas Rast, (Sat Jan 24, 3:47 pm)
Re: Heads up: major rebase -i -p rework coming up, Junio C Hamano, (Sat Jan 24, 4:01 pm)
Re: Heads up: major rebase -i -p rework coming up, Johannes Schindelin, (Sat Jan 24, 7:05 pm)
Re: Heads up: major rebase -i -p rework coming up, Johannes Schindelin, (Sat Jan 24, 7:23 pm)
Re: Heads up: major rebase -i -p rework coming up, Johannes Schindelin, (Sat Jan 24, 7:25 pm)
Re: Heads up: major rebase -i -p rework coming up, Marc Branchaud, (Mon Jan 26, 9:10 am)
Re: Heads up: major rebase -i -p rework coming up, Marc Branchaud, (Mon Jan 26, 9:21 am)
Re: Heads up: major rebase -i -p rework coming up, Stephen Haberman, (Tue Jan 27, 8:21 am)
Re: Heads up: major rebase -i -p rework coming up, Johannes Schindelin, (Tue Jan 27, 11:08 am)
Re: Heads up: major rebase -i -p rework coming up, Nanako Shiraishi, (Tue Jan 27, 3:10 pm)
Re: Heads up: major rebase -i -p rework coming up, Stephen Haberman, (Tue Jan 27, 3:36 pm)