diff --git a/scripts/bash-status-git b/scripts/bash-status-git index 0c5d0e1..4c2d614 100755 --- a/scripts/bash-status-git +++ b/scripts/bash-status-git @@ -7,9 +7,11 @@ if git status &>/dev/null; then to_push=${counts[0]} to_pull=${counts[1]} + extras=$([[ ${counts[0]} -eq 0 && ${counts[1]} -eq 0 ]] || echo " $to_push↑ $to_pull↓") + if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then - echo "($branch* $to_push↑ $to_pull↓)" + echo "($branch*$extras)" else - echo "($branch~ $to_push↑ $to_pull↓)" + echo "($branch~$extras)" fi fi