Thread (11 messages) flat view 11 messages, 6 authors, 2016-06-15

Re: [PATCH] rebase: learn --discard subcommand

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:51:20

Hi,

Martin von Zweigbergk wrote:
Teach git-rebase the --discard subcommand, which is similar to
--abort, but does not move back to the original branch.  Suggest this
new subcommand to the user where we currently suggest to delete
$GIT_DIR/rebase-apply (or rebase-merge).
Good idea.

At first the name --discard made me think it was going to move back to
the original branch and discard the reset of the patch series being
rebased.  Not sure what a better name would be, though.
quoted hunk ↗ jump to hunk
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -238,6 +238,9 @@ leave out at most one of A and B, in which case it defaults to HEAD.
[...]
+--discard::
+	Abort the rebase operation without restoring the original branch.
A reader without a complete mental model for what "git rebase" does
could be very confused by this.  One might think: does this mean that
git has been scribbling over the original branch, and this switch
almost completely cancels that but leaves the branch still
scribbled-on?

How about something like:

 --keep-head::
	When aborting a rebase, do not check out the original branch
	but leave the HEAD alone.  This can be useful if you forgot
	about a conflicted or interactive rebase in progress and have
	been committing on top of one of the commits being replayed.

?

Agh, "git rebase --abort --keep-head" feels a little too long to be
memorable.  Still, hope that helps.

Ciao,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help