Skip to content

Commit c3f95c1

Browse files
authored
scripts : allow wc2wt with an existing branch (ggml-org#23189)
1 parent 0caf2a1 commit c3f95c1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/wc2wt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dir=$(basename $(pwd))
3737
# sanitize branch name for directory name (replace / with -)
3838
dir_suffix=$(echo "$BRANCH" | tr '/' '-')
3939

40-
git worktree add -b "$BRANCH" "../$dir-$dir_suffix" HEAD
40+
git worktree add "../$dir-$dir_suffix" "$BRANCH" || git worktree add -b "$BRANCH" "../$dir-$dir_suffix" HEAD
4141

4242
og_path=$(pwd)
4343
wt_path=$(cd "../$dir-$dir_suffix" && pwd)

0 commit comments

Comments
 (0)