summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/utils3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/utils b/scripts/utils
index 8837c3c..1c56d1d 100644
--- a/scripts/utils
+++ b/scripts/utils
@@ -39,7 +39,8 @@ _git_fetch() {
local BRANCH="$3"
[ -n "$BRANCH" ] || BRANCH=master
git_fetch_bare "$1" "$4/$2"
- git --git-dir="$4/$2" --bare worktree add --detach "$2" "$BRANCH"
+ git --git-dir="$4/$2" --bare worktree prune # remove old work trees
+ git --git-dir="$4/$2" --bare worktree add --force --detach "$2" "$BRANCH"
}
# Fetch git repository with mirror