Compare commits

...

2 commits

Author SHA1 Message Date
2f2af2e0c0 fix upstream branch names 2025-03-10 18:50:47 +01:00
791c1d9e0b remove unnecessary formatting variable 2025-03-10 18:49:28 +01:00

4
gis
View file

@ -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
@ -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})"