threads / discuss / 29056

mini-wierdness with "git am"

Subject: mini-wierdness with "git am"

## tl;dr

2 messages between Nov 30, 2011 and Dec 1, 2011.

replies: 1people: 2as markdown or json

Aghiles· Nov 30, 2011, 23:12 UTC · lore
Hello,
I am using : git version 1.7.0.3, in Mac OS X.

A slightly strange behavior occurs with "git am --abort". Here is the sequence:

> git am 000*

error: ... : patch doesn not apply (oops, forgot to reset)

> git reset --hard HEAD~1
> git am 000*

previous rebase directory ... still exists but mbox given. (oops, forgot to abort)

> git am --abort

At this point, my repository is back to ORIG_HEAD! Meaning that it reverted my preivous "git reset --hard HEAD~1".

Hope this is clear.
As usual, thanks for the great product.
-- aghiles
Andrew Wong· Dec 1, 2011, 15:38 UTC · re: Aghiles · lore

Re: mini-wierdness with "git am"

On 11/30/2011 06:12 PM, Aghiles wrote:
> At this point, my repository is back to ORIG_HEAD!
> Meaning that it reverted my preivous "git reset --hard HEAD~1".
>   

This behavior seems to have been fixed in v1.7.3.5 and later. The new behavior will skip the reverting, and only perform the clean up.

http://article.gmane.org/gmane.comp.version-control.git/164045

← back to recent threads