git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Björn Steinbrink" <B.Steinbrink@gmx.de>,
	"Andreas Ericsson" <ae@op5.se>, "Mike Hommey" <mh@glandium.org>,
	git@vger.kernel.org
Subject: Re: git rebase --skip
Date: Thu, 8 Nov 2007 22:22:29 -0500	[thread overview]
Message-ID: <20071109032227.GA31760@sigill.intra.peff.net> (raw)
In-Reply-To: <7vir4cz45z.fsf@gitster.siamese.dyndns.org>

On Thu, Nov 08, 2007 at 03:52:08PM -0800, Junio C Hamano wrote:

> The user is explicitly saying --skip, so I do not think it is
> dangerous even if we unconditionally did "reset --hard" at that
> point.

Sure, I think the complaint is not that "reset --hard" is the wrong
behavior, but that people are prone to type --skip in error. Right now
we handle that error in a data-preserving way (we complain, and the user
has to think and issue a "throw away this data" command), but automatic
reset is less safe (even though there are fewer times when somebody
meant to commit instead of just reset, the consequences are harder to
recover from).

I've never personally run into this, but I think it is a reasonable
thing to think about, and if it is easy to add an additional safety
valve (either stashing the index/wt state, or checking before automatic
"reset --hard" whether any work has been done towards resolving), then
we probably should.

So I am fine with the original patch (unconditional reset --hard), but
it would be nice to see the people who care submit concrete proposals
for such a safety valve.

> Or we could introduce a new option "--drop" (that's "drop the
> current commit and continue") to do so, if people find that the
> word "skip" does not sound like a scary destructive operation.

I don't think the problem is "users don't realize how scary --skip can
be", but rather "I use --skip to resolve this situation 99% of the time,
so in the other 1%, I soetimes use it accidentally."

-Peff

  parent reply	other threads:[~2007-11-09  3:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-07 22:21 git rebase --skip Mike Hommey
2007-11-07 22:48 ` Johannes Schindelin
2007-11-08  3:23 ` Jeff King
2007-11-08  3:31   ` Jakub Narebski
2007-11-08 10:24   ` Björn Steinbrink
2007-11-08 10:32     ` Andreas Ericsson
2007-11-08 10:44       ` Björn Steinbrink
2007-11-08 23:16         ` Jeff King
2007-11-08 23:52           ` Junio C Hamano
2007-11-09  1:09             ` Björn Steinbrink
2007-11-09  3:22             ` Jeff King [this message]
2007-11-09 10:59               ` Johannes Schindelin
2007-11-09 16:19                 ` J. Bruce Fields
2007-11-09 16:26                   ` J. Bruce Fields
2007-11-09 17:20                 ` Jeff King
2007-11-08 18:43     ` Daniel Barkalow
2007-11-08 19:16       ` Mike Hommey
2007-11-08 19:22         ` Mike Hommey
2007-11-08 23:01         ` Johannes Schindelin
2007-11-08  7:03 ` [PATCH] Do git reset --hard HEAD when using " Mike Hommey

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=20071109032227.GA31760@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=B.Steinbrink@gmx.de \
    --cc=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mh@glandium.org \
    /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;
as well as URLs for NNTP newsgroup(s).