bash-git-prompt
bash-git-prompt copied to clipboard
Stash marker has unexpected behavior when repo directory contains a space
When using bash-git-prompt in a repo where the directory contains a space, the stash marker shows some unexpected behavior. Specifically, it only seems to work in the top level directory, and shows zero stashes in any child directories.
mkdir 'dir with space'
cd 'dir with space'
git init
echo 'one' > test.txt
git add test.txt
git commit -m 'test'
echo 'two' >> test.txt
git stash
# note that stash marker correctly shows one stash (⚑1)
mkdir dir
cd dir
# stash marker now shows zero stashes
If you repeat the above steps in a directory with no spaces, then everything works as expected.
I haven't had a chance to look into it, yet, but I'm guessing there's a directory variable somewhere missing quotes.