Add back the display of the current local branch we're on. Add newlines for readability.

This commit is contained in:
2025-10-15 06:32:28 -07:00
parent 2ca308c287
commit 57ca267aa5

View File

@@ -896,10 +896,12 @@
function load-branch { function load-branch {
rcvr="$1" # branch which we want to modify rcvr="$1" # branch which we want to modify
base="$2" # branch with the changes we want base="$2" # branch with the changes we want
if [[ "$rcvr" == "main" ]]; then if [[ "$rcvr" == "main" ]]; then
echo "*** ERROR: Are you nuts, fool!? Not main! Do it manually! ***" echo "*** ERROR: Are you nuts, fool!? Not main! Do it manually! ***"
exit 1 exit 1
fi fi
if [[ -z "$base" ]]; then if [[ -z "$base" ]]; then
if [[ "$rcvr" == "prod" ]]; then if [[ "$rcvr" == "prod" ]]; then
base="stage" base="stage"
@@ -913,6 +915,7 @@
else else
echo "* Requested pointing '$rcvr' branch to '$base'." echo "* Requested pointing '$rcvr' branch to '$base'."
fi fi
echo -e "\n* Ensuring we are on base branch '$base'." && echo -e "\n* Ensuring we are on base branch '$base'." &&
git switch "$base" && git switch "$base" &&
echo -e "\n* Changing pointer for '$rcvr' to '$base'." && echo -e "\n* Changing pointer for '$rcvr' to '$base'." &&
@@ -928,6 +931,9 @@
echo -e "\n* Switching back to dev." echo -e "\n* Switching back to dev."
git switch "$base" git switch "$base"
fi fi
echo -e "\n* Verifying which branch we're on."
git branch
} }
alias load-prod="load-branch prod" alias load-prod="load-branch prod"
alias load-stage="load-branch stage" alias load-stage="load-branch stage"