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

Re: [PATCH] stash: Don't fail if work dir contains file named 'HEAD'

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 3, 2012, 19:44 UTC
Message-ID
<7vwr98tvti.fsf@alter.siamese.dyndns.org>
In-Reply-To
<913BB2F9-3C51-44D0-BFEC-3A49A5EC9E15@JonathonMah.com>
Jonathon Mah <me@JonathonMah.com> writes:
Show 12 quoted lines
> When performing a plain "git stash" (without --patch), git-diff would fail
> with "fatal: ambiguous argument 'HEAD': both revision and filename". The
> output was piped into git-update-index, masking the failed exit status.
> The output is now sent to a temporary file (which is cleaned up by
> existing code), and the exit status is checked. The "HEAD" arg to the
> git-diff invocation has been disambiguated too, of course.
>
> In patch mode, "git stash -p" would fail harmlessly, leaving the working
> dir untouched.
>
> Signed-off-by: Jonathon Mah <me@JonathonMah.com>
> ---
Thanks.
Previous: Jonathon Mah
Message 4 of 4 in “stash: Don't fail if work dir contains file named 'HEAD'”
  1. stash: Don't fail if work dir contains file named 'HEAD'Jonathon Mah, Dec 29, 2011
  2. Thomas RastDec 30, 2011
  3. Jonathon MahDec 31, 2011
  4. Junio C HamanoJan 3, 2012

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.