From d8d19263d19621d641f5d584a8e3b132036944f2 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 13 Jun 2024 14:55:09 +1000 Subject: [PATCH] don't use a worktree for the fs_* branches --- do_merge | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/do_merge b/do_merge index 9f46350..4592d2f 100755 --- 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 -- 2.39.5