summaryrefslogtreecommitdiffstatshomepage
path: root/ui-clone.h (follow)
Commit message (Collapse)AuthorAgeLines
* Support Git over HTTP by proxying git-http-backend(1)git-http-backendWolfgang Müller2021-05-28-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Switch to exclusively using global ctxLukas Fleischer2014-01-17-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the context parameter from the following functions (and all static helpers used by them) and use the global context instead: * cgit_print_http_headers() * cgit_print_docstart() * cgit_print_pageheader() Remove context parameter from all commands Drop the context parameter from the following functions (and all static helpers used by them) and use the global context instead: * cgit_get_cmd() * All cgit command functions. * cgit_clone_info() * cgit_clone_objects() * cgit_clone_head() * cgit_print_plain() * cgit_show_stats() In initialization routines, use the global context variable instead of passing a pointer around locally. Remove callback data parameter for cache slots This is no longer needed since the context is always read from the global context variable. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
* Add support for cloning over httpLars Hjemli2008-08-06-0/+8
This patch implements basic support for cloning over http, based on the work on git-http-backend by Shawn O. Pearce. Signed-off-by: Lars Hjemli <hjemli@gmail.com>