From f85fc0da5d6d20f83af6bb7786c503d04c6f98ed Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Mon, 1 Sep 2014 00:50:58 -0700 Subject: [PATCH] git-http-backend-verify: honor GIT_HTTP_BACKEND_SHOW_ERRORS Only when GIT_HTTP_BACKEND_SHOW_ERRORS is set are git-http-backend errors allowed to enter the server log. In the case of personal mob activity GIT_HTTP_BACKEND_SHOW_ERRORS was not being checked. Fix this by checking GIT_HTTP_BACKEND_SHOW_ERRORS for peronsal mob activity as well. --- bin/git-http-backend-verify | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/git-http-backend-verify b/bin/git-http-backend-verify index 78e3cb5..abe33ed 100755 --- a/bin/git-http-backend-verify +++ b/bin/git-http-backend-verify @@ -9,7 +9,7 @@ # # Note that GIT_PROJECT_ROOT must be set to use this script. # -# Also prevent standard error output from git-http-backend cluttering up the +# Also prevents standard error output from git-http-backend cluttering up the # server's log unless GIT_HTTP_BACKEND_SHOW_ERRORS is set to a non-empty value. set -e @@ -168,7 +168,11 @@ if ! "$cfg_basedir/bin/can_user_push_http" "$projbare" "$authuser"; then if [ "$cfg_mob" = "mob" -a "$authuser" != "mob" -a -d "$cfg_reporoot/$proj/mob" ] && "$cfg_basedir/bin/can_user_push_http" "$projbare" "mob"; then export PATH_INFO="/$proj/mob/$suffix" - exec "$cfg_git_http_backend_bin" "$@" + if [ -n "$GIT_HTTP_BACKEND_SHOW_ERRORS" ]; then + exec "$cfg_git_http_backend_bin" "$@" + else + exec "$cfg_git_http_backend_bin" "$@" 2>/dev/null + fi internalerr "exec failed: $cfg_git_http_backend_bin" exit 1 fi -- 2.11.4.GIT