From 45518fce6cf1d93b353b6cb8b1ff8c69dd1dc60b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 10 Apr 2017 17:12:32 -0600 Subject: [PATCH 1/2] fix: ensure git check-ref-format runs quietly --- plugins/git/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/functions b/plugins/git/functions index 031ce1d3b..c998b5a2e 100755 --- a/plugins/git/functions +++ b/plugins/git/functions @@ -107,7 +107,7 @@ git_hook_cmd() { local APP="$2" local DOKKU_DEPLOY_BRANCH="$(git_deploy_branch "$APP")" - if ! git check-ref-format --branch "$DOKKU_DEPLOY_BRANCH" 2> /dev/null; then + if ! git check-ref-format --branch "$DOKKU_DEPLOY_BRANCH" > /dev/null 2>&1; then echo $'\e[1G\e[K'"-----> WARNING: Invalid branch name '$DOKKU_DEPLOY_BRANCH' specified via DOKKU_DEPLOY_BRANCH." echo $'\e[1G\e[K'"-----> For more details, please see the man page for 'git-check-ref-format.'" return From 8dadc4cf506cfb0f524c1d641044eef9a15fe582 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 10 Apr 2017 17:12:46 -0600 Subject: [PATCH 2/2] fix: de-dent post-extract output --- plugins/git/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/functions b/plugins/git/functions index c998b5a2e..40d5cac2d 100755 --- a/plugins/git/functions +++ b/plugins/git/functions @@ -60,7 +60,7 @@ git_build_app_repo() { suppress_output git submodule update --init --recursive find . -name .git -prune -exec rm -rf {} \; > /dev/null - plugn trigger post-extract "$APP" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV" + plugn trigger post-extract "$APP" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV" | sed -u "s/^/"$'\e[1G'"/" if [[ -f Dockerfile ]] && [[ "$([[ -f .env ]] && grep -q BUILDPACK_URL .env; echo $?)" != "0" ]] && [[ ! -f ".buildpacks" ]] && [[ -z $(config_get "$APP" BUILDPACK_URL || true) ]]; then plugn trigger pre-receive-app "$APP" "dockerfile" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV"