More style fixes for shgit

This commit is contained in:
Lucas 2019-12-10 11:30:20 +00:00
parent 0d2097cee2
commit 09bf6ae01a

View File

@ -16,17 +16,16 @@ shgit()
gitdir=$(git rev-parse --git-dir 2>/dev/null) && [ -n "$gitdir" ] ||
return
symbolic=$(git symbolic-ref --short HEAD 2>/dev/null)
name=${symbolic:-}
name=$(git symbolic-ref --short HEAD 2>/dev/null)
if [ -z "$name" ]; then
hash=$(git rev-parse --short HEAD 2>/dev/null)
name=${hash:-"?"}
name=$(git rev-parse --short HEAD 2>/dev/null)
name=${hash:-?}
fi
rb=
rbdir="$gitdir/rebase-merge"
rbdir=$gitdir/rebase-merge
if [ -d "$rbdir" ]; then
rb="${SHGIT_SEP}REBASE"
rb=${SHGIT_SEP}REBASE
read -r name <"$rbdir/head-name"
name=${name##*/}
[ -f "$rbdir/interactive" ] && rb="$rb-i"
@ -36,7 +35,7 @@ shgit()
fi
status=
[ -n "$(git status --porcelain)" ] && status="${SHGIT_SEP}*"
[ -n "$(git status --porcelain)" ] && status=${SHGIT_SEP}*
commits=$(git rev-list --left-right --count @{upstream}...HEAD \
2>/dev/null | {