git: d937ddacc65c - main - Revert "git-arc: Add stage -n to not change the branch"

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Tue, 08 Apr 2025 11:00:05 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=d937ddacc65c8dfbb9f4df4a520f8f60ebe6358f

commit d937ddacc65c8dfbb9f4df4a520f8f60ebe6358f
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-04-08 10:59:44 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2025-04-08 10:59:44 +0000

    Revert "git-arc: Add stage -n to not change the branch"
    
    It shouldn't have been pushed
    
    This reverts commit 1c6170d7712265beecb318309ec5afaddbcf350e.
---
 tools/tools/git/git-arc.sh | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh
index 7d2387565b9a..b49721159799 100644
--- a/tools/tools/git/git-arc.sh
+++ b/tools/tools/git/git-arc.sh
@@ -654,15 +654,11 @@ gitarc__stage()
     local author branch commit commits diff reviewers title tmp
 
     branch=main
-    change_branch=yes
-    while getopts b:n o; do
+    while getopts b: o; do
         case "$o" in
         b)
             branch="$OPTARG"
             ;;
-        n)
-            change_branch=no
-            ;;
         *)
             err_usage
             ;;
@@ -672,12 +668,10 @@ gitarc__stage()
 
     commits=$(build_commit_list "$@")
 
-    if [ "$change_branch" = "yes" ]; then
-        if [ "$branch" = "main" ]; then
-            git checkout -q main
-        else
-            git checkout -q -b "${branch}" main
-        fi
+    if [ "$branch" = "main" ]; then
+        git checkout -q main
+    else
+        git checkout -q -b "${branch}" main
     fi
 
     tmp=$(xmktemp)