diff --git a/plugins/git/functions b/plugins/git/functions index c98efab1b..152360eac 100755 --- a/plugins/git/functions +++ b/plugins/git/functions @@ -64,6 +64,12 @@ git_build_app_repo() { suppress_output git submodule update --init --recursive find . -name .git -prune -exec rm -rf {} \; > /dev/null + if use_git_worktree; then + pushd "$DOKKU_ROOT/$APP" + git worktree prune + popd + fi + local DOKKU_APP_DISABLE_ANSI_PREFIX_REMOVAL DOKKU_GLOBAL_DISABLE_ANSI_PREFIX_REMOVAL DOKKU_DISABLE_ANSI_PREFIX_REMOVAL DOKKU_APP_DISABLE_ANSI_PREFIX_REMOVAL=$(config_get "$APP" DOKKU_DISABLE_ANSI_PREFIX_REMOVAL || true) DOKKU_GLOBAL_DISABLE_ANSI_PREFIX_REMOVAL=$(config_get --global DOKKU_DISABLE_ANSI_PREFIX_REMOVAL || true)