Skip to content

Commit 6401489

Browse files
committed
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
2 parents 3ef87bd + 0fa7f01 commit 6401489

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/completion/git-prompt.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,8 @@ __git_ps1 ()
468468
fi
469469
fi
470470
if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
471-
[ -r "$g/refs/stash" ]; then
471+
git rev-parse --verify --quiet refs/stash >/dev/null
472+
then
472473
s="$"
473474
fi
474475

0 commit comments

Comments
 (0)