mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-05 16:48:38 +00:00
Fix.
This commit is contained in:
parent
6230eeec4a
commit
1b4c0b59b4
1 changed files with 3 additions and 3 deletions
|
@ -143,19 +143,19 @@ function updateprompt () {
|
||||||
if [[ -n ${remote} ]] ; then
|
if [[ -n ${remote} ]] ; then
|
||||||
# for git prior to 1.7
|
# for git prior to 1.7
|
||||||
# ahead=$(git rev-list origin/${hook_com[branch]}..HEAD | wc -l)
|
# ahead=$(git rev-list origin/${hook_com[branch]}..HEAD | wc -l)
|
||||||
local ahead="$(git rev-list ${branch}@{upstream}..HEAD 2>/dev/null | wc -l)"
|
local ahead="$(git rev-list ${branch}@{upstream}..HEAD 2>/dev/null | wc -l | xargs)"
|
||||||
gitstatus+=( "${GREEN}+${ahead}${GRAY}" )
|
gitstatus+=( "${GREEN}+${ahead}${GRAY}" )
|
||||||
|
|
||||||
# for git prior to 1.7
|
# for git prior to 1.7
|
||||||
# behind=$(git rev-list HEAD..origin/${hook_com[branch]} | wc -l)
|
# behind=$(git rev-list HEAD..origin/${hook_com[branch]} | wc -l)
|
||||||
local behind="$(git rev-list HEAD..${branch}@{upstream} 2>/dev/null | wc -l)"
|
local behind="$(git rev-list HEAD..${branch}@{upstream} 2>/dev/null | wc -l | xargs)"
|
||||||
gitstatus+=( "${RED}-${behind}${GRAY}" )
|
gitstatus+=( "${RED}-${behind}${GRAY}" )
|
||||||
|
|
||||||
remotepart="${RESETCOLOR}${GRAY}[${remote} ${(j:/:)gitstatus}]${RESETCOLOR}"
|
remotepart="${RESETCOLOR}${GRAY}[${remote} ${(j:/:)gitstatus}]${RESETCOLOR}"
|
||||||
fi
|
fi
|
||||||
local stashpart=""
|
local stashpart=""
|
||||||
if [[ -s ${gitdir}/refs/stash ]] ; then
|
if [[ -s ${gitdir}/refs/stash ]] ; then
|
||||||
stashes=$(git stash list 2>/dev/null | wc -l)
|
stashes="$(git stash list 2>/dev/null | wc -l | xargs)"
|
||||||
stashpart="${RESETCOLOR}${GRAY}(${GREEN}${stashes}${GRAY} stashed)${RESETCOLOR}"
|
stashpart="${RESETCOLOR}${GRAY}(${GREEN}${stashes}${GRAY} stashed)${RESETCOLOR}"
|
||||||
fi
|
fi
|
||||||
local stats="$(git_prompt_status)"
|
local stats="$(git_prompt_status)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue