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