]> git.ozlabs.org Git - next-scripts/commitdiff
don't use a worktree for the fs_* branches
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Jun 2024 04:55:09 +0000 (14:55 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Jun 2024 04:55:09 +0000 (14:55 +1000)
do_merge

index 9f46350f363cb4f1365c5f89646ab64e395d8b7d..4592d2f91f4155ec1282d5b8c8fbbe1ddfa0e56e 100755 (executable)
--- a/do_merge
+++ b/do_merge
@@ -100,18 +100,14 @@ for h in $heads; do
                if [ "$new_branch" = 'master' ]; then
                        old_branch=$(git branch --show-current)
                        if ! [ "$old_branch" = 'master' ]; then
-                               if ! cd ../next; then
-                                       fix_up 'no ../next directory!'
+                               if ! git checkout master; then
+                                       fix_up 'git checkout master failed'
                                fi
-                               git worktree remove "$old_branch"
                        fi
                else
                        base=${branch#"$new_branch"/}
-                       if ! git worktree add -B "$new_branch" ../"$new_branch" "$base"; then
-                               fix_up 'git worktree add failed'
-                       fi
-                       if ! cd ../"$new_branch"; then
-                               fix_up 'cannot chdir to new worktree directory'
+                       if ! git checkout -B "$new_branch" "$base"; then
+                               fix_up "git checkout $new_branch failed"
                        fi
                fi
                continue