From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Eduardo Habkost <ehabkost@raisama.net>, git@vger.kernel.org
Subject: Re: Bug: 'git am --abort' can silently reset the wrong branch
Date: Fri, 08 May 2009 02:01:16 -0700 [thread overview]
Message-ID: <7v7i0s0y03.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20090508082826.GA29737@coredump.intra.peff.net> (Jeff King's message of "Fri\, 8 May 2009 04\:28\:26 -0400")
Jeff King <peff@peff.net> writes:
> Switching branches and clobbering some other branch
> with --abort is just _one_ thing you can do to screw yourself. You could
> also have been doing useful work on the _same_ branch, and that would
> get clobbered by --abort. However, I'm not sure if we have a good way
> of telling the difference between "work which I did to try to get these
> patches to apply, but which should be thrown away when I abort" and
> "work which I did because I forgot I had an active git-am".
I think I've said this already, but honestly speaking, I think --abort
should not do --reset at all, but just remove the $dotest directory. Or
perhaps introduce a --clear option to do so.
At least your patch is an improvement.
What I sometimes see to my users happen is to try applying to the oldest
integration branch the patch (the users think) ought to apply, see it fail
to apply, switch to a bit newer branch and run "am" again (trusting that
it will pick up the material from $dotest), repeat the above and then give
up with "git am --abort". I do not think anybody can offhand explain to
which branch and to what state the command takes the user back to in such
a situation without looking at what the code actually does X-<; even
though I think it should take the user back to the original branch, I do
not think that is what the code does.
next prev parent reply other threads:[~2009-05-08 9:01 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 [this message]
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
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=7v7i0s0y03.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=ehabkost@raisama.net \
--cc=git@vger.kernel.org \
--cc=peff@peff.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).