From: Junio C Hamano Date: Tue, 03 Jan 2012 19:44:41 GMT Subject: Re: [PATCH] stash: Don't fail if work dir contains file named 'HEAD' Message-ID: <7vwr98tvti.fsf@alter.siamese.dyndns.org> In-Reply-To: <913BB2F9-3C51-44D0-BFEC-3A49A5EC9E15@JonathonMah.com> Jonathon Mah writes: > 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 > --- Thanks.