From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: Sverre Rabbelier <srabbelier@gmail.com>,
Anders Melchiorsen <mail@cup.kalibalik.dk>,
git@vger.kernel.org, Johannes.Schindelin@gmx.de
Subject: Re: [RFC PATCH] Make the rebase edit mode really end up in an edit state
Date: Thu, 15 Jan 2009 17:09:58 -0800 [thread overview]
Message-ID: <7v3afkqcnt.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20090115225912.GL9794@neumann> (SZEDER Gábor's message of "Thu, 15 Jan 2009 23:59:12 +0100")
SZEDER Gábor <szeder@ira.uka.de> writes:
> But the current behaviour of the 'edit' rebase command gives you the
> possibility of adding further commits on top of the selected one
> (after you have edited that or left intact, doesn't matter). To do
> that with this automatic 'reset --soft HEAD^' modification you would
> first need to 'git commit -c @{1}' to keep the selected commit before
> going on with adding further commits, which is not quite nice.
Yeah, I agree.
I think my confusion mostly came from perception, and the way the "edit"
action is (not) explained.
What "edit" means is "pick this commit and then stop to give control back
to the user. The user is free to muck with the history starting from the
state after picking the named commit in any way, and --continue will carry
on the rest of the insns from the state" [*1*]. Once I realize that,
it becomes clear what it means to do any of the following when "edit"
gives the control back to me:
(1) commit --amend (with or without changing the tree and message); this
is the originally intended usage. Edit the commit the machinery just
picked and let it continue. The end result is as if you edited one
commit in the sequence.
(2) making completely unrelated commits on top of the state "edit" gave
you; this inserts a new commit in the sequence.
(3) first "reset HEAD^", commit selected parts of the difference in one
commit, commit the reaminder in another commit; this splits the
commit the machinery just picked into two.
By the way, "rebase --continue" codepath has extra code that does
something magical when the index does not match the HEAD commit. I
suspect what it does makes sense only in the originally intended usage
sequence (i.e. "edit" stops, you want to do "commit --amend" and then
"rebase --continue" but somehow you forgot to commit everything).
How well does that logic work when the user wanted to do (2) or (3) above,
and happened to have the index unclean when s/he said "rebase --continue"?
Does it do something nonsensical?
[Footnote]
*1* Explained the same way, "pick" is "cherry-pick the named commit to
replay its effect and then continue".
next prev parent reply other threads:[~2009-01-16 1:11 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 0:27 [RFC PATCH] Make the rebase edit mode really end up in an edit state Anders Melchiorsen
2009-01-15 0:43 ` Junio C Hamano
2009-01-15 2:49 ` Boyd Stephen Smith Jr.
2009-01-15 4:10 ` Miles Bader
2009-01-15 5:00 ` Boyd Stephen Smith Jr.
2009-01-15 6:13 ` Junio C Hamano
2009-01-15 12:24 ` Johannes Schindelin
2009-01-15 15:35 ` SZEDER Gábor
2009-01-15 22:09 ` Junio C Hamano
2009-01-15 22:20 ` Sverre Rabbelier
2009-01-15 22:59 ` SZEDER Gábor
2009-01-16 0:11 ` Björn Steinbrink
2009-01-16 1:34 ` Johannes Schindelin
2009-01-18 1:24 ` Anders Melchiorsen
2009-01-16 1:09 ` Junio C Hamano [this message]
2009-01-16 12:10 ` Johannes Schindelin
2009-01-15 0:49 ` Stephan Beyer
2009-01-15 0:53 ` Johannes Schindelin
2009-01-15 7:35 ` Johannes Sixt
2009-01-15 10:01 ` Johan Herland
2009-01-15 11:52 ` Sverre Rabbelier
2009-01-15 12:36 ` Johannes Schindelin
2009-01-15 12:44 ` Adeodato Simó
2009-01-15 13:41 ` Johannes Schindelin
2009-01-15 13:41 ` Sverre Rabbelier
2009-01-15 13:57 ` Stephan Beyer
2009-01-15 14:02 ` Johannes Schindelin
2009-01-15 13:43 ` Adeodato Simó
2009-01-15 12:45 ` Sverre Rabbelier
2009-01-15 13:42 ` Johannes Schindelin
2009-01-15 13:56 ` Sverre Rabbelier
2009-01-15 16:59 ` Junio C Hamano
2009-01-15 17:16 ` Sverre Rabbelier
2009-01-15 18:21 ` Johannes Schindelin
2009-01-15 18:46 ` Johan Herland
2009-01-15 18:53 ` Anders Melchiorsen
2009-01-15 19:28 ` Johannes Schindelin
2009-01-15 19:27 ` Wincent Colaiuta
2009-01-15 20:26 ` Jay Soffian
2009-01-15 21:58 ` Wincent Colaiuta
2009-01-16 9:50 ` Johan Herland
2009-01-16 10:27 ` Anders Melchiorsen
2009-01-16 10:58 ` Johan Herland
2009-01-16 12:42 ` SZEDER Gábor
2009-01-16 12:57 ` Johannes Schindelin
2009-01-16 13:27 ` SZEDER Gábor
2009-01-16 14:28 ` Wincent Colaiuta
2009-01-16 13:12 ` Sverre Rabbelier
2009-01-16 17:26 ` Stephan Beyer
2009-01-16 21:06 ` Johannes Schindelin
2009-01-15 12:52 ` Pieter de Bie
2009-01-15 12:55 ` Sverre Rabbelier
2009-01-15 12:57 ` Pieter de Bie
2009-01-15 13:46 ` Björn Steinbrink
2009-01-15 13:54 ` Johan Herland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v3afkqcnt.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=mail@cup.kalibalik.dk \
--cc=srabbelier@gmail.com \
--cc=szeder@ira.uka.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.