Skip to main content

Slightly tidy up these debug logs

ID
f788958
date
2025-04-23 07:27:04+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
bdd1078
message
Slightly tidy up these debug logs
changed files
1 file, 8 additions, 3 deletions

Changed files

git/cleanup_branches (1087) → git/cleanup_branches (1213)

diff --git a/git/cleanup_branches b/git/cleanup_branches
index ffe79d2..a3ee9b7 100755
--- a/git/cleanup_branches
+++ b/git/cleanup_branches
@@ -23,10 +23,15 @@ else
   PRIMARY_BRANCH="main"
 fi
 
-print_info "-> Deduced primary branch as $PRIMARY_BRANCH"
-
 CURRENT_BRANCH=$(git branch --show-current)
-print_info "-> Current branch is $CURRENT_BRANCH"
+
+if [[ "$PRIMARY_BRANCH" = "$CURRENT_BRANCH" ]]
+then
+  print_info "-> Current branch is $CURRENT_BRANCH, which is primary"
+else
+  print_info "-> Primary branch is $PRIMARY_BRANCH"
+  print_info "-> Current branch is $CURRENT_BRANCH"
+fi
 
 for branch in $(git branch --merged "$PRIMARY_BRANCH" | grep -v '*')
 do