From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC PATCH] am: do not do any reset on --abort
Date: Mon, 25 May 2009 08:00:19 -0400 [thread overview]
Message-ID: <20090525120019.GA1740@coredump.intra.peff.net> (raw)
In-Reply-To: <alpine.DEB.1.00.0905251348050.4288@intel-tinevez-2-302>
On Mon, May 25, 2009 at 01:49:18PM +0200, Johannes Schindelin wrote:
> > We really have no idea what state the tree is in at this
> > point, and whether the user might have done useful work on
> > top of it. So let's err on the side of keeping the user's
> > data intact.
> >
> > The downside is that if they do have cruft to get rid of, or
> > want to pretend as if earlier parts of the series that were
> > applied did not exist, they must manually "git reset --hard"
> > now.
>
> Hmm. I think I would revert that patch after merging git.git right away.
You know, you can just say you don't like it. ;)
> Can you at least check for a dirty tree and reset --hard if it is clean?
No, that would defeat the purpose. The problem is that we have no idea
what has happened since the initial "git am". The user may have made
commits they want to keep, and we don't want to reset those away. They
may even have pulled, which means ORIG_HEAD can no longer be trusted for
a reset.
> In the other case, you could still say "you seem to have modifications,
> bla bla bla"...
I think you raise a good point here. If we do decide to stop doing the
reset automatically, it is probably better not to simply stop doing it
(as my patch does), but to downgrade it to a warning ("You probably want
to reset, etc...").
-Peff
next prev parent reply other threads:[~2009-05-25 12:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 19:19 Bug: 'git am --abort' can silently reset the wrong branch Eduardo Habkost
2009-05-08 8:28 ` Jeff King
2009-05-08 8:37 ` Sverre Rabbelier
2009-05-08 9:01 ` Junio C Hamano
2009-05-08 9:12 ` Jeff King
2009-05-25 10:43 ` [RFC PATCH] am: do not do any reset on --abort Jeff King
2009-05-25 11:49 ` Johannes Schindelin
2009-05-25 12:00 ` Jeff King [this message]
2009-05-25 12:17 ` Johannes Sixt
2009-05-25 15:54 ` Avery Pennarun
2009-05-25 16:00 ` Jeff King
2009-05-25 16:02 ` Jeff King
2009-05-25 16:10 ` Avery Pennarun
2009-05-25 22:23 ` Junio C Hamano
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=20090525120019.GA1740@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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;
as well as URLs for NNTP newsgroup(s).