git-worktree: handle upstream force push

See https://github.com/rust-lang/crates.io-index/commit/8bb596f3f1
This commit is contained in:
Zenithal 2023-04-11 15:11:53 +08:00
parent 40c1711615
commit 50718ecb0f

View File

@ -34,7 +34,7 @@ function checkout_branch() {
$git_option clone "$repo_dir" --branch "$branch" --single-branch "$work_tree"
else
cd "$work_tree"
$git_option pull
$git_option checkout -B "$branch" "origin/$branch"
fi
}