shgit: use IFS correctly
This commit is contained in:
parent
6cdd3337fd
commit
f1c39a568c
1 changed files with 5 additions and 2 deletions
|
@ -45,8 +45,11 @@ shgit()
|
|||
status=${SHGIT_SEP}?
|
||||
fi
|
||||
|
||||
IFS=" " set -- $(git rev-list --left-right --count \
|
||||
@{upstream}...HEAD 2>/dev/null)
|
||||
oldIFS=$IFS
|
||||
IFS=" "
|
||||
set -- $(git rev-list --left-right --count @{upstream}...HEAD \
|
||||
2>/dev/null)
|
||||
IFS=$oldIFS
|
||||
commits=v${1:-0}^${2:-0}
|
||||
commits=${commits#v0}
|
||||
commits=${commits%^0}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue