From: Jeff King <peff@peff.net>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
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 12:00:20 -0400 [thread overview]
Message-ID: <20090525160020.GA5449@coredump.intra.peff.net> (raw)
In-Reply-To: <32541b130905250854v981277oe093ee4990726a2a@mail.gmail.com>
On Mon, May 25, 2009 at 11:54:36AM -0400, Avery Pennarun wrote:
> On Mon, May 25, 2009 at 8:17 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> > $ git am --abort
> > OUTCH! other-branch was reset!
>
> If *that's* your problem, then presumably you could avoid it just by
> checking whether the right branch corresponds to HEAD before doing a
> reset.
But that only covers one problem. How about you forgot that you had a
failed am in progress, waited hours or days, made some commits on the
same branch, tried to am a series, got the "in progress" message and
then did an "--abort"?
And yes, I have done that.
In both examples, an alternative method for dealing with this is to try
to alert the user that we are in the middle of an am when doing
potentially suspicious things (like switching branches or making commits
outside of "git am --resolved"). I don't know how well that would work
in practice.
-Peff
next prev parent reply other threads:[~2009-05-25 16: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
2009-05-25 12:17 ` Johannes Sixt
2009-05-25 15:54 ` Avery Pennarun
2009-05-25 16:00 ` Jeff King [this message]
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=20090525160020.GA5449@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
/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).