More style fixes for shgit
This commit is contained in:
parent
0d2097cee2
commit
09bf6ae01a
13
utils/shgit
13
utils/shgit
@ -16,17 +16,16 @@ shgit()
|
|||||||
gitdir=$(git rev-parse --git-dir 2>/dev/null) && [ -n "$gitdir" ] ||
|
gitdir=$(git rev-parse --git-dir 2>/dev/null) && [ -n "$gitdir" ] ||
|
||||||
return
|
return
|
||||||
|
|
||||||
symbolic=$(git symbolic-ref --short HEAD 2>/dev/null)
|
name=$(git symbolic-ref --short HEAD 2>/dev/null)
|
||||||
name=${symbolic:-}
|
|
||||||
if [ -z "$name" ]; then
|
if [ -z "$name" ]; then
|
||||||
hash=$(git rev-parse --short HEAD 2>/dev/null)
|
name=$(git rev-parse --short HEAD 2>/dev/null)
|
||||||
name=${hash:-"?"}
|
name=${hash:-?}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rb=
|
rb=
|
||||||
rbdir="$gitdir/rebase-merge"
|
rbdir=$gitdir/rebase-merge
|
||||||
if [ -d "$rbdir" ]; then
|
if [ -d "$rbdir" ]; then
|
||||||
rb="${SHGIT_SEP}REBASE"
|
rb=${SHGIT_SEP}REBASE
|
||||||
read -r name <"$rbdir/head-name"
|
read -r name <"$rbdir/head-name"
|
||||||
name=${name##*/}
|
name=${name##*/}
|
||||||
[ -f "$rbdir/interactive" ] && rb="$rb-i"
|
[ -f "$rbdir/interactive" ] && rb="$rb-i"
|
||||||
@ -36,7 +35,7 @@ shgit()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
status=
|
status=
|
||||||
[ -n "$(git status --porcelain)" ] && status="${SHGIT_SEP}*"
|
[ -n "$(git status --porcelain)" ] && status=${SHGIT_SEP}*
|
||||||
|
|
||||||
commits=$(git rev-list --left-right --count @{upstream}...HEAD \
|
commits=$(git rev-list --left-right --count @{upstream}...HEAD \
|
||||||
2>/dev/null | {
|
2>/dev/null | {
|
||||||
|
Loading…
Reference in New Issue
Block a user