1
0
Fork 0
mirror of synced 2024-06-16 13:51:10 -04:00

Revert accidental commit to git-info/init.zsh

This commit is contained in:
ℳichiel ℛoos 2017-05-10 14:05:23 +02:00 committed by GitHub
parent fdac790840
commit 1d8c542239

View file

@ -174,9 +174,11 @@ git-info() {
zstyle -s ':zim:git-info:behind' format 'behind_format' zstyle -s ':zim:git-info:behind' format 'behind_format'
zstyle -s ':zim:git-info:diverged' format 'diverged_format' zstyle -s ':zim:git-info:diverged' format 'diverged_format'
if [[ -n ${ahead_format} || -n ${behind_format} || -n ${diverged_format} ]]; then if [[ -n ${ahead_format} || -n ${behind_format} || -n ${diverged_format} ]]; then
# Get ahead and behind counts from the commit difference counts between local and remote. # Gets the commit difference counts between local and remote.
local ahead_and_behind local ahead_and_behind_cmd='command git rev-list --count --left-right HEAD...@{upstream}'
ahead_and_behind=${(z)$(command git rev-list --count --left-right HEAD...@{upstream} 2>/dev/null)}
# Get ahead and behind counts.
local ahead_and_behind=$(${(z)ahead_and_behind_cmd} 2>/dev/null)
local ahead=${ahead_and_behind[(w)1]} local ahead=${ahead_and_behind[(w)1]}
local behind=${ahead_and_behind[(w)2]} local behind=${ahead_and_behind[(w)2]}