Git development
 help / color / mirror / Atom feed
From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Ramkumar Ramachandra <artagnon@gmail.com>,
	Tim Mazid <timmazid@hotmail.com>
Subject: Re: [PATCH] rebase: learn --discard subcommand
Date: Sun, 29 May 2011 13:28:26 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1105290916470.28815@debian> (raw)
In-Reply-To: <20110528230844.GA31498@elie>


On Sat, 28 May 2011, Jonathan Nieder wrote:

> 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.

Maybe --stop as Tim suggested, but I think that also makes it sound
like we're dropping the rest of the patches. Other names would be
--cancel or --forget.

> > --- 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?

The --abort subcommand is currently described as "Restore the original
branch and abort the rebase operation.", so that would be in need of
the same clarification.

> 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.
> 
> ?

Thanks. I like it. Maybe with "... or if you have moved to an
unrelated commit" or something like that be added to the end.

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

I intended --discard to be used _instead_ of --abort. Do you think it
makes more sense to have it as an option to --abort or was it just
that the word "subcommand" confused you? I meant it as "subcommand of
git rebase".


/Martin

  parent reply	other threads:[~2011-05-29 17:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-28  2:58 [PATCH] rebase: learn --discard subcommand Martin von Zweigbergk
2011-05-28 13:15 ` Ramkumar Ramachandra
2011-05-29 12:50   ` Martin von Zweigbergk
2011-05-28 18:51 ` Junio C Hamano
2011-05-28 20:26   ` Tim Mazid
2011-05-28 22:50     ` Jonathan Nieder
2011-05-29 13:14   ` Martin von Zweigbergk
2011-05-29 13:41     ` Jakub Narebski
2011-05-30  4:50   ` Michael Haggerty
2011-05-28 23:08 ` Jonathan Nieder
2011-05-29  9:30   ` Tim Mazid
2011-05-29 17:28   ` Martin von Zweigbergk [this message]
2011-05-29 18:58     ` Jonathan Nieder
2011-05-30  4:46   ` Michael Haggerty
2011-05-30  5:14     ` Tim Mazid
2011-05-30  8:44       ` Michael Haggerty
2011-05-30  5:01   ` Miles Bader

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=alpine.DEB.2.00.1105290916470.28815@debian \
    --to=martin.von.zweigbergk@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=timmazid@hotmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox