Re: [RFC PATCH] Make the rebase edit mode really end up in an edit state
- From
Johan Herland <johan@herland.net>
- Date
- Jan 16, 2009, 09:50 UTC
- Message-ID
- <200901161050.13971.johan@herland.net>
- In-Reply-To
- <76718490901151226l704d119bh297db4e91a4da05b@mail.gmail.com>
On Thursday 15 January 2009, Jay Soffian wrote:
> On Thu, Jan 15, 2009 at 2:27 PM, Wincent Colaiuta <win@wincent.com> wrote: > > wait - best suggestion so far, seeing as we can't use "stop" > This is a fun game. I like the color "halt".
Nice. I like this one as well.
After some more thinking (triggered by Junio's recent post in another subthread), it occured to me that the current behaviour (currently known as "edit") is not something that is applied to one of the commits in the rebase list per se, but rather something that affects the rebase machinery *between* commits. So instead of
edit e8902c1 Foo
we should consider something like
pick e8902c1 Foo halt
which I think better encapsulates the current behaviour. (IOW, insert "halt" wherever you'd like to muck about with the history; e.g. doing "commit --amend", inserting extra commits, etc.)
We can then make shortcuts for common actions:
amend e8902c1 Foo
does a "pick" followed by "commit --amend" (for editing the commit message), followed by "rebase --continue". Finally, we implement Anders' suggestion:
modify e8902c1 Foo
(or whatever synonym for "edit" we converge on) does a "pick" followed by a "reset --soft HEAD^", followed by a "halt".
Have fun!
...Johan
-- Johan Herland, <johan@herland.net> www.herland.net