From d937ddacc65c8dfbb9f4df4a520f8f60ebe6358f Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Tue, 8 Apr 2025 11:59:44 +0100 Subject: [PATCH] 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 7d2387565b9..b4972115979 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)