We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57df952 commit 918a6ecCopy full SHA for 918a6ec
middleware.js
@@ -107,10 +107,12 @@ function factory (config) {
107
return
108
}
109
110
+ const env = req.headers['git-protocol'] ? { GIT_PROTOCOL: req.headers['git-protocol'] } : {}
111
+
112
res.setHeader('content-type', service.type)
113
console.log(chalk.green('[git-http-server] 200 ' + pad(req.method) + ' ' + req.url))
114
// console.log('[git-http-server] ' + service.cmd + ' ' + service.args.concat(gitdir).join(' '))
- var ps = spawn(service.cmd, service.args.concat(gitdir))
115
+ var ps = spawn(service.cmd, service.args.concat(gitdir), { env })
116
ps.stdout.pipe(service.createStream()).pipe(ps.stdin)
117
})).pipe(res)
118
0 commit comments