Re: [RFC PATCH] am: do not do any reset on --abort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]