tags:

views:

66

answers:

2

Hi,

I setup my shell prompt to show git branch. So it looks like

/Volumes/android/mydroid/packages/apps/Contacts(1.6_r1.4) $

But after I did this:
$ git am < 0001-my.patch
Patch does not have a valid e-mail address.

The prompt change to
/Volumes/android/mydroid/packages/apps/Contacts(1.6_r1.4|AM) $

Can you please tell me what does 'AM' in the prompt means? And how can I reverse it?

Thank you.

A: 

It just need that a git-am - Apply a series of patches from a mailbox - is in progress.
When you have finished to apply those patches, the message will get back to normal.
(you can also cancel the whole process and get back to what ORIG_HEAD points to, as explained in HEAD and ORIG_HEAD in Git)

You prompt display script must be like this one, with the following code showing the 'am' status:

  local g="$(git rev-parse --git-dir 2>/dev/null)"
    if [ -n "$g" ]; then
      local r
      local b
      if [ -d "$g/rebase-apply" ]; then
        if test -f "$g/rebase-apply/rebasing"; then
          r="|rebase"
        elif test -f "$g/rebase-apply/applying"; then
          r="|am"
        else
          r="|am/rebase"
        fi
VonC
+2  A: 

The 'AM' portion of the prompt means that you are in the middle of applying a set of patches to your branch. From your question, it appears that you there was an error when applying the patch and you don't want to continue.

To halt the process, you need to run git am --abort. See the git am man page for details.

Tim Henigan