Thread (11 messages) flat view 11 messages, 5 authors, 2016-06-15

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

From: Jeff King <hidden>
Date: 2016-06-15 22:46:49

On Mon, May 25, 2009 at 11:54:36AM -0400, Avery Pennarun wrote:
On Mon, May 25, 2009 at 8:17 AM, Johannes Sixt [off-list ref] wrote:
quoted
  $ 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help