]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
scripts : allow wc2wt with an existing branch (#23189)
authorGeorgi Gerganov <redacted>
Mon, 18 May 2026 05:57:28 +0000 (08:57 +0300)
committerGitHub <redacted>
Mon, 18 May 2026 05:57:28 +0000 (08:57 +0300)
scripts/wc2wt.sh

index 157881b458f041394e1810860ef780edc1a6afcc..b6e92f86934180ccc251cd13b248113a96d3fe54 100755 (executable)
@@ -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)