We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b4d2dc + 4efb83b commit e6424efCopy full SHA for e6424ef
git-http-backend.go
@@ -131,7 +131,7 @@ func serviceRpc(hr HandlerReq) {
131
w.Header().Set("X-Content-Type-Options", "nosniff")
132
w.WriteHeader(http.StatusOK)
133
134
- env := []string{}
+ env := os.Environ()
135
136
if config.DefaultEnv != "" {
137
env = append(env, config.DefaultEnv)
@@ -151,7 +151,7 @@ func serviceRpc(hr HandlerReq) {
151
cmd := exec.Command(config.GitBinPath, args...)
152
version := r.Header.Get("Git-Protocol")
153
if len(version) != 0 {
154
- cmd.Env = append(os.Environ(), fmt.Sprintf("GIT_PROTOCOL=%s", version))
+ cmd.Env = append(env, fmt.Sprintf("GIT_PROTOCOL=%s", version))
155
}
156
cmd.Dir = dir
157
cmd.Env = env
0 commit comments