summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Hunter <m@lfurio.us>2026-03-08 19:05:15 -0400
committerMatt Hunter <m@lfurio.us>2026-03-30 21:56:09 -0400
commit23b39889be1b58f17c945b54b6d180778a0f86ed (patch)
treeb18ae45ed4f80a56a05c49890c7a7d61da99be5c
parent4613d4359f5eadf866bf1582276fae81fc3d680f (diff)
downloadgit-sonar-23b39889be1b58f17c945b54b6d180778a0f86ed.tar.gz
git-sonar-23b39889be1b58f17c945b54b6d180778a0f86ed.zip
Match remote/local commits display order of arrows and numbers
When showing the number of commits two branches are ahead or behind each other, always show the amount behind on the left side of the arrows and the amount ahead on the right. This style is taken from the %{remote} commits element, which used to show commit counts this way to better illustrate that master and the current branch are being compared. Update the %{local} commits element to match this style. Signed-off-by: Matt Hunter <m@lfurio.us>
Diffstat (limited to '')
-rwxr-xr-xgit-sonar2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-sonar b/git-sonar
index 172529c..0cd53be 100755
--- a/git-sonar
+++ b/git-sonar
@@ -279,7 +279,7 @@ color_local_commits() {
elif [ "$local_behind" -gt 0 ]; then
local_commits="$local_behind$red_behind_arrow"
elif [ "$local_ahead" -gt 0 ]; then
- local_commits="$local_ahead$green_ahead_arrow"
+ local_commits="$green_ahead_arrow$local_ahead"
fi
fi
printf $PRINT_F_OPTION "$local_commits"