From c3f95c1f069c91e21b8063b09907a5fba38d1695 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 18 May 2026 08:57:28 +0300 Subject: [PATCH] scripts : allow wc2wt with an existing branch (#23189) --- scripts/wc2wt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wc2wt.sh b/scripts/wc2wt.sh index 157881b458..b6e92f8693 100755 --- a/scripts/wc2wt.sh +++ b/scripts/wc2wt.sh @@ -37,7 +37,7 @@ dir=$(basename $(pwd)) # sanitize branch name for directory name (replace / with -) dir_suffix=$(echo "$BRANCH" | tr '/' '-') -git worktree add -b "$BRANCH" "../$dir-$dir_suffix" HEAD +git worktree add "../$dir-$dir_suffix" "$BRANCH" || git worktree add -b "$BRANCH" "../$dir-$dir_suffix" HEAD og_path=$(pwd) wt_path=$(cd "../$dir-$dir_suffix" && pwd)