Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-29 03:15:04 +0300
committerJunio C Hamano <gitster@pobox.com>2007-11-29 03:41:18 +0300
commit38762c47d6442dc0ce0f45533f9151877c485337 (patch)
tree23b98d604a03c5715938cec97fe3fed1bde08bc9 /git-stash.sh
parent1e72a40de99be24809eba5abdab4c0b00846b9b5 (diff)
scripts: do not get confused with HEAD in work tree
When you have a file called HEAD in your work tree, many commands that our scripts feed "HEAD" to would complain about the rev vs path ambiguity. A solution is to form command line more carefully by appending -- to them, which makes it clear that we mean HEAD rev not HEAD file. This patch would apply to maint. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-stash.sh b/git-stash.sh
index 5bbda47b7b..77c94210b7 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -14,7 +14,7 @@ trap 'rm -f "$TMP-*"' 0
ref_stash=refs/stash
no_changes () {
- git diff-index --quiet --cached HEAD &&
+ git diff-index --quiet --cached HEAD -- &&
git diff-files --quiet
}