From 23b39889be1b58f17c945b54b6d180778a0f86ed Mon Sep 17 00:00:00 2001 From: Matt Hunter Date: Sun, 8 Mar 2026 19:05:15 -0400 Subject: 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 --- git-sonar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- cgit v1.2.3