From 87b31de266d0188886beed511e0af88be57226c5 Mon Sep 17 00:00:00 2001 From: Yehor Lvivski Date: Sat, 9 Nov 2013 00:26:11 +0200 Subject: [PATCH] respect `GIT_DIR` --- prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompt.sh b/prompt.sh index 384f736..278fe8a 100644 --- a/prompt.sh +++ b/prompt.sh @@ -110,7 +110,7 @@ function build_prompt { will_rebase=$(git config --get branch.${current_branch}.rebase 2> /dev/null) - number_of_stashes=$(wc -l 2> /dev/null < .git/refs/stash) + number_of_stashes=$(wc -l 2> /dev/null < ${GIT_DIR:-.git}/refs/stash) if [[ $number_of_stashes -gt 0 ]]; then has_stashes=true; else has_stashes=false; fi fi fi