Re: [RFC PATCH] Make the rebase edit mode really end up in an edit state

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Thursday, January 15, 2009 - 6:09 pm

SZEDER Gábor <szeder@ira.uka.de> writes:


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".
--
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:
[RFC PATCH] Make the rebase edit mode really end up in an ..., Anders Melchiorsen, (Wed Jan 14, 5:27 pm)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Wed Jan 14, 5:53 pm)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Boyd Stephen Smith Jr., (Wed Jan 14, 7:49 pm)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Boyd Stephen Smith Jr., (Wed Jan 14, 10:00 pm)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Thu Jan 15, 5:24 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Thu Jan 15, 5:36 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Thu Jan 15, 6:41 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Thu Jan 15, 6:42 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Thu Jan 15, 7:02 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Sverre Rabbelier, (Thu Jan 15, 10:16 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Thu Jan 15, 11:21 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Anders Melchiorsen, (Thu Jan 15, 11:53 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Wincent Colaiuta, (Thu Jan 15, 12:27 pm)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Thu Jan 15, 12:28 pm)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Junio C Hamano, (Thu Jan 15, 6:09 pm)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Thu Jan 15, 6:34 pm)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Anders Melchiorsen, (Fri Jan 16, 3:27 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Fri Jan 16, 5:10 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Fri Jan 16, 5:57 am)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Johannes Schindelin, (Fri Jan 16, 2:06 pm)
Re: [RFC PATCH] Make the rebase edit mode really end up in ..., Anders Melchiorsen, (Sat Jan 17, 6:24 pm)