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