Revert "git-arc: Add stage -n to not change the branch"
It shouldn't have been pushed
This reverts commit 1c6170d771.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user