[ARVADOS] updated: f78ee6387642d4dd0faf9071e44319a2ee42ce2f

Git user git at public.curoverse.com
Thu Oct 13 14:47:20 EDT 2016


Summary of changes:
 services/arv-git-httpd/git_handler.go | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

       via  f78ee6387642d4dd0faf9071e44319a2ee42ce2f (commit)
      from  20a717071130eee4afb4704617c51ff165d735d9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit f78ee6387642d4dd0faf9071e44319a2ee42ce2f
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Oct 13 14:47:10 2016 -0400

    10234: Pass through gitolite env vars so old env-var-configured sites continue working.

diff --git a/services/arv-git-httpd/git_handler.go b/services/arv-git-httpd/git_handler.go
index f8e38e9..2caf129 100644
--- a/services/arv-git-httpd/git_handler.go
+++ b/services/arv-git-httpd/git_handler.go
@@ -17,13 +17,18 @@ type gitHandler struct {
 }
 
 func newGitHandler() http.Handler {
+	const glBypass = "GL_BYPASS_ACCESS_CHECKS"
+	const glHome = "GITOLITE_HTTP_HOME"
 	var env []string
 	path := os.Getenv("PATH")
 	if theConfig.GitoliteHome != "" {
 		env = append(env,
-			"GITOLITE_HTTP_HOME="+theConfig.GitoliteHome,
-			"GL_BYPASS_ACCESS_CHECKS=1")
+			glHome+"="+theConfig.GitoliteHome,
+			glBypass+"=1")
 		path = path + ":" + theConfig.GitoliteHome + "/bin"
+	} else if home, bypass := os.Getenv(glHome), os.Getenv(glBypass); home != "" || bypass != "" {
+		env = append(env, glHome+"="+home, glBypass+"="+bypass)
+		log.Printf("DEPRECATED: Passing through %s and %s environment variables. Use GitoliteHome configuration instead.", glHome, glBypass)
 	}
 	env = append(env,
 		"GIT_PROJECT_ROOT="+theConfig.RepoRoot,

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list