1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-11 00:00:06 +00:00

Make use of git dir determined by VCS_INFO subsystem

instead of determine the git dir manually.
This commit is contained in:
Dominik Ritter 2018-11-03 03:11:51 +01:00
parent 9a67ca5bc3
commit d07507c1eb

View file

@ -104,7 +104,7 @@ function +vi-git-tagname() {
function +vi-git-stash() {
local -a stashes
if [[ -s $(command git rev-parse --git-dir)/refs/stash ]] ; then
if [[ -s "${vcs_comm[gitdir]}/refs/stash" ]] ; then
stashes=$(command git stash list 2>/dev/null | wc -l)
hook_com[misc]+=" $(print_icon 'VCS_STASH_ICON')${stashes// /}"
fi