Commit 958a2cd1 authored by Ben Boeckel's avatar Ben Boeckel

update-common: prune worktrees before making a new one

The script ends up leaving old worktrees laying around which is an error
in new version of Git.

Fixes: #2
parent 9a35692c
......@@ -114,6 +114,8 @@ trap "rm -rf '$workdir'" EXIT
git clone "$repo" "$upstreamdir"
if [ -n "$basehash" ]; then
# Remove old worktrees
git worktree prune
# Use the existing package's history
git worktree add "$extractdir" "$basehash"
# Clear out the working tree
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment