Merge pull request #9 from lvivski/master

respect `GIT_DIR`
This commit is contained in:
Arialdo Martini 2013-11-08 22:29:41 -08:00
commit 0ee0f4aec2

View File

@ -110,7 +110,7 @@ function build_prompt {
will_rebase=$(git config --get branch.${current_branch}.rebase 2> /dev/null) 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 if [[ $number_of_stashes -gt 0 ]]; then has_stashes=true; else has_stashes=false; fi
fi fi
fi fi