Commit 0fa7f016 authored by Jeff King's avatar Jeff King Committed by Junio C Hamano

git-prompt: do not look for refs/stash in $GIT_DIR

Since dd0b72cb (bash prompt: use bash builtins to check stash
state, 2011-04-01), git-prompt checks whether we have a
stash by looking for $GIT_DIR/refs/stash. Generally external
programs should never do this, because they would miss

That commit claims that packed-refs does not pack
refs/stash, but that is not quite true. It does pack the
ref, but due to a bug, fails to prune the ref. When we fix
that bug, we would want to be doing the right thing here.
Signed-off-by: default avatarJeff King <[email protected]>
Reviewed-by: default avatarMichael Haggerty <[email protected]>
Reviewed-by: default avatarRonnie Sahlberg <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 32f56600
......@@ -468,7 +468,8 @@ __git_ps1 ()
if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
[ -r "$g/refs/stash" ]; then
git rev-parse --verify --quiet refs/stash >/dev/null
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment