From 12efcd02b1997e8d0342509adfc6d2e5f979c412 Mon Sep 17 00:00:00 2001 From: kjwon15 Date: Thu, 22 Feb 2018 10:42:31 +0900 Subject: [PATCH] Prune worktree after build --- plugins/git/functions | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/git/functions b/plugins/git/functions index c98efab1b..a73926839 100755 --- a/plugins/git/functions +++ b/plugins/git/functions @@ -41,6 +41,7 @@ git_build_app_repo() { # unset the git quarantine path to allow us to use 2.13.0+ # See this issue for more information: https://github.com/dokku/dokku/issues/2796 env -u GIT_QUARANTINE_PATH git worktree add "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV" > /dev/null + trap 'git worktree prune > /dev/null' RETURN INT TERM EXIT popd > /dev/null pushd "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" > /dev/null else