summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-09-09 12:54:08 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-09-09 12:54:08 -0700
commit64014894cfd29114a6b60cc501f06a68b5f3606b (patch)
treeb1a9c1fe4fc1d3708a5dd4dac9ea4b5cf23a3042
parentMerge branch 'tb/pretty-format-cd-date-format' (diff)
parentgit-prompt: do not look for refs/stash in $GIT_DIR (diff)
downloadtgif-64014894cfd29114a6b60cc501f06a68b5f3606b.tar.xz
Merge branch 'jk/prompt-stash-could-be-packed'
The prompt script checked $GIT_DIR/ref/stash file to see if there is a stash, which was a no-no. * jk/prompt-stash-could-be-packed: git-prompt: do not look for refs/stash in $GIT_DIR
-rw-r--r--contrib/completion/git-prompt.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 9d684b10a6..c5473dc8db 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -468,7 +468,8 @@ __git_ps1 ()
fi
fi
if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
- [ -r "$g/refs/stash" ]; then
+ git rev-parse --verify --quiet refs/stash >/dev/null
+ then
s="$"
fi