From 4840292211271a8d6477122279d900ced4ccc2f9 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 26 2018 10:37:19 +0000 Subject: Have a dedicated variable to bypass gitolite when doing a git push This variable is then checked in gitolite's update hook to avoid triggering it which would fail the push since we're pushing directly to the git repo on disk w/o going through gitolite itself. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/git.py b/pagure/lib/git.py index 08b3f80..893fc69 100644 --- a/pagure/lib/git.py +++ b/pagure/lib/git.py @@ -992,6 +992,7 @@ class TemporaryClone(object): _log.debug("Opts: %s", opts) env = os.environ.copy() env["GL_USER"] = username + env["BYPASS_GITOLITE"] = "defined" env.update(extra) out = subprocess.check_output( ["git"] + opts + ["push", "origin", pushref],