aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm/core/git.sh
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-08-22 23:16:00 -0500
committerJesús <heckyel@hyperbola.info>2021-08-22 23:16:00 -0500
commitcb1d4f4995005e2e44324cb060c085322e992024 (patch)
tree9f853b8b412e37d745f40912c6f19b57e13218f6 /hyperterm/core/git.sh
parent50cc4c28b6fc979ed7e13cf4f7d91bdd2cd7bebb (diff)
downloadhyperterm-cb1d4f4995005e2e44324cb060c085322e992024.tar.lz
hyperterm-cb1d4f4995005e2e44324cb060c085322e992024.tar.xz
hyperterm-cb1d4f4995005e2e44324cb060c085322e992024.zip
Use -n instead of ! -z
Diffstat (limited to 'hyperterm/core/git.sh')
-rw-r--r--hyperterm/core/git.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/hyperterm/core/git.sh b/hyperterm/core/git.sh
index fc89a3c..616e158 100644
--- a/hyperterm/core/git.sh
+++ b/hyperterm/core/git.sh
@@ -150,7 +150,7 @@ ___upstream="$(git rev-parse --symbolic-full-name --abbrev-ref "@{upstream}" 2>
function _git_behind_count() {
local __behind_count
- if [[ ! -z $___upstream ]]; then
+ if [[ -n $___upstream ]]; then
__behind_count="$(git rev-list --left-right --count "$___upstream"...HEAD | cut -f1 2> /dev/null)"
case $__behind_count in
0) echo -n '';;
@@ -161,7 +161,7 @@ function _git_behind_count() {
function _git_ahead_count() {
local __ahead_count
- if [[ ! -z $___upstream ]]; then
+ if [[ -n $___upstream ]]; then
__ahead_count="$(git rev-list --left-right --count "$___upstream"...HEAD | cut -f2 2> /dev/null)"
case $__ahead_count in
0) echo -n '';;