From 5b81e0aa93702515e5ced5a1ebde5bcb1065190e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 11 Nov 2020 15:42:31 +0100 Subject: switch_all_submodules_to_head_and_clean: Clean up abandoned worktrees before adding a new worktree. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- switch_all_submodules_to_head_and_clean | 1 + 1 file changed, 1 insertion(+) diff --git a/switch_all_submodules_to_head_and_clean b/switch_all_submodules_to_head_and_clean index 5ca3d13..2c136fd 100755 --- a/switch_all_submodules_to_head_and_clean +++ b/switch_all_submodules_to_head_and_clean @@ -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 -- cgit v1.2.1