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>
pull/3/head
Slávek Banko 4 years ago
parent 1215cfd777
commit 5b81e0aa93
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