switch_all_submodules_to_head_and_clean: Clean up abandoned worktrees

before adding a new worktree.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 5b81e0aa93)
r14.0.x
Slávek Banko 4 years ago
parent 9df5b598ec
commit f7a155f1a9
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -134,6 +134,7 @@ updateModule() {
(
cd $REPO_LOCALTREE &&
git fetch &&
git worktree prune &&
git worktree add $PARENTDIR/$MODULE$submodule $branch &&
cd $PARENTDIR/$MODULE$submodule &&
git branch --set-upstream-to=origin/$branch

Loading…
Cancel
Save