diff options
author | Wolfgang Müller | 2021-05-28 16:03:01 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-05-28 16:03:01 +0200 |
commit | 2d8f83a3072970a51c45d2f72724696781ef6de8 (patch) | |
tree | d86368112ae3b3743b8c9b55a2161d9c2aa7dbfa /tests/t0107-snapshot.sh | |
parent | 69a9085b7b833c5c8a445784b479518cb391baae (diff) | |
download | cgit-2d8f83a3072970a51c45d2f72724696781ef6de8.tar.gz |
Support Git over HTTP by proxying git-http-backend(1)git-http-backend
cgit lacks an easy way to support the "smart" HTTP protocol out of the
box. A patch [1] has been proposed in the past, but was never merged.
A few years later there was a short discussion at [2] which did not go
anywhere.
The majority of users who want to support the "smart" HTTP protocol
right now seem to conditionally point their web server to
git-http-backend(1) directly. This relies on proper path-matching and
regular expression support in the web server as seen in the EXMAPLES
section of git-http-backend(1).
As proposed in [3], it is possible to have cgit interface with the
necessary functionality in Git directly, but that would require more
work. It does not seem that this is something forthcoming in cgit.
Instead, for now, use a modified version of the patch suggested in [1],
which simply executes git-http-backend(1) when needed. This removes the
need for any additional plumbing in the web server.
Notable changes to the original patch:
* Remove automatic handling of GIT_PROJECT_ROOT in favour of having the
user set the variable correctly themselves. This reduces complexity.
* Use the correct function to generate error pages. The original patch
used html_status(), which does not exist anymore.
* In cmd.c, adjust the struct entries to fit. Sadly we cannot use the
def_cmd() macro directly, as the endpoints "git-upload-pack" and
"git-receive-pack" contain dashes.
[1] https://lists.zx2c4.com/pipermail/cgit/2014-December/002312.html
[2] https://lists.zx2c4.com/pipermail/cgit/2016-February/002907.html
[3] https://lists.zx2c4.com/pipermail/cgit/2016-February/002926.html
Diffstat (limited to 'tests/t0107-snapshot.sh')
0 files changed, 0 insertions, 0 deletions