git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-am annoyance

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 27, 2009, 22:30 UTC
Message-ID
<7vr62o1iww.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<bd6139dc0901271407i4406d5e6u6db1df9e5a7bdc4f@mail.gmail.com>
Sverre Rabbelier <alturin@gmail.com> writes:
> Observe what happens if, on accident, rather than running a alias
> (amendall), the 'tab' didn't catch on:
> $ git am
> ^C
It wants to read from the stdin as "git am < mbox" is a valid usage.

A patch to detect that the input was killed with ^C and clean things up would be welcome. Also we may be able to detect "-t 0", too.

> $ # ok, now what do I do?
Here is one thing you could do.
    $ PS1=': $(__git_ps1 "%s"); '
    : master|AM/REBASE; 
    : master|AM/REBASE; git am --abort
But you are right.  We should be able to detect this.

I think it was just people who often use "am" are so used to correctly the command that the state where no state files are created didn't happen often and never reported the breakage.

Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 2 of 4 in “git-am annoyance”
  1. Sverre RabbelierJan 27, 2009
  2. Junio C HamanoJan 27, 2009
  3. Sverre RabbelierJan 27, 2009
  4. Johannes SchindelinJan 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.