Hi Peff,
Le 2021-09-08 à 06:57, Jeff King a écrit :
On Wed, Sep 08, 2021 at 06:48:47AM -0400, Jeff King wrote:
Both of the included examples here have been tested to work. The one for
lighttpd is a little less direct than I'd like, but I couldn't find a
way to directly set an environment variable to the value of a request
header. From my reading of the documentation, lighttpd will set
HTTP_GIT_PROTOCOL automatically, but git-http-backend looks only at
GIT_PROTOCOL. Arguably http-backend should do this translation itself.
So having discovered this, I kind of wonder if these documentation
patches are barking up the wrong tree. There is no reason we would not
want v2 to work out of the box (after all, it does for git://).
The patch below does that (and could replace both my and Konstantin's
documentation patches).
I agree it's nice to make it work out of the box, without the web server
admin having to configure anything. But, I'm not sure we should completely
drop the documentation patches: your patch will only affect future versions
of git-http-backend, and users of previous versions will be left without
any documentation as to how to configure it for protocol v2. So I would think we should
keep the documentation patches, maybe with a mention "this should not be necessary
in Git 2.34 and later versions" or something like that (since your
commit message mentions that it "generally" should work like that depending
on the web servers).
This also makes me wonder if we should be documenting the use of
AcceptEnv for ssh (which sadly I don't think we can make work
out-of-the-box).
I think it would be a good idea to document it, yes. FWIW I found out about
it at https://docs.gitlab.com/ee/administration/git_protocol.html.
Cheers,
Philippe.