File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 13
13
zstyle -a " :vcs_info:${vcs} :${usercontext} :${rrn} " trackingformats formats || return 0
14
14
15
15
# Are we on a remote-tracking branch?
16
- remote=${$(git rev-parse --verify ${hook_com[branch]} @ {upstream} \
16
+ remote=${$($vcs_comm [cmd] rev-parse --verify ${hook_com[branch]} @ {upstream} \
17
17
--symbolic-full-name 2> /dev/null)/refs\/ remotes\/ }
18
18
19
19
if [[ -n ${remote} ]] ; then
20
- ahead=$( git rev-list ${hook_com[branch]} @{upstream}..HEAD 2> /dev/null | wc -l)
21
- behind=$( git rev-list HEAD..${hook_com[branch]} @{upstream} 2> /dev/null | wc -l)
20
+ ahead=$( $vcs_comm [cmd] rev-list ${hook_com[branch]} @{upstream}..HEAD 2> /dev/null | wc -l)
21
+ behind=$( $vcs_comm [cmd] rev-list HEAD..${hook_com[branch]} @{upstream} 2> /dev/null | wc -l)
22
22
if (( ahead && behind )) ; then
23
23
zformat -f tmp $formats [3] a:$ahead b:$behind
24
24
elif (( ahead )) ; then
40
40
41
41
if [[ -n $format && -s ${hook_com[base_orig]} /.git/refs/stash ]] ; then
42
42
# find number of stashed commits
43
- stashes=$( git stash list 2> /dev/null | wc -l)
43
+ stashes=$( $vcs_comm [cmd] stash list 2> /dev/null | wc -l)
44
44
(( stashes )) || return 0
45
45
46
46
# add to misc
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ is-at-least 4.3.12 || return
45
45
46
46
# git has the only detect mechanism that does not set the basedir. sheesh.
47
47
if (( $+ vcs_comm[gitdir] )) ; then
48
- hook_com[base]=${PWD%/ ${$( ${vcs_comm[cmd]} rev-parse --show-prefix )%/## } }
48
+ hook_com[base]=${PWD%/ ${$( ${vcs_comm[cmd]} rev-parse --show-prefix 2> / dev / null )%/## } }
49
49
elif (( $+ vcs_comm[base] )) ; then
50
50
hook_com[base]=$vcs_comm [basedir]
51
51
else
You can’t perform that action at this time.
0 commit comments