From 791c1d9e0b138b0f7af70126c91b0c49915ebcc7 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Mon, 10 Mar 2025 18:49:28 +0100 Subject: [PATCH 1/2] remove unnecessary formatting variable --- gis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gis b/gis index 5405741..b643e7c 100755 --- a/gis +++ b/gis @@ -248,7 +248,7 @@ for dir in "${git_dirs[@]}"; do fi if [ "$current_branch" != "$origin_head" ]; then num_additional_branches=$(( num_additional_branches - 1 )) - output="${output} (${origin_head}${text_reset})" + output="${output} (${origin_head})" fi if [[ $num_additional_branches -gt 0 ]]; then output="${output} (+${num_additional_branches})" From 2f2af2e0c0dc51f2706141249f1bd6ff55e54d3d Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Mon, 10 Mar 2025 18:50:47 +0100 Subject: [PATCH 2/2] fix upstream branch names --- gis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gis b/gis index b643e7c..d01598e 100755 --- a/gis +++ b/gis @@ -183,7 +183,7 @@ for dir in "${git_dirs[@]}"; do # Get origin head if git symbolic-ref refs/remotes/origin/HEAD > /dev/null 2>&1; then - [[ $(git symbolic-ref refs/remotes/origin/HEAD) =~ \/([^\/]*)$ ]] &>/dev/null && origin_head="${BASH_REMATCH[1]}" + [[ $(git symbolic-ref refs/remotes/origin/HEAD) =~ refs/remotes/origin/(.*)$ ]] &>/dev/null && origin_head="${BASH_REMATCH[1]}" else origin_head="$current_branch" fi