zsh:funcs:g-ch-worktree: Restart on issues
Restart the subshell until every issue is resolved and the worktree is removed.
This commit is contained in:
@@ -392,8 +392,15 @@ git-checkout-worktree() {
|
|||||||
|
|
||||||
# Cleanup when exiting
|
# Cleanup when exiting
|
||||||
popd -q
|
popd -q
|
||||||
git worktree remove "$REPO_DIR"
|
|
||||||
git worktree prune
|
|
||||||
|
|
||||||
|
# Restart the subshell until every issue is resolved and the worktree is
|
||||||
|
# removed
|
||||||
|
until git worktree remove "$REPO_DIR"; do
|
||||||
|
pushd -q "$REPO_DIR"
|
||||||
|
"$SHELL"
|
||||||
|
popd -q
|
||||||
|
done
|
||||||
|
|
||||||
|
git worktree prune
|
||||||
command rm -rf "$TEMP_DIR"
|
command rm -rf "$TEMP_DIR"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user