aboutsummaryrefslogtreecommitdiff
path: root/ui-clone.c
Commit message (Collapse)AuthorAge
* ui-clone.c: Fix off-by-one error in pack pathJason A. Donenfeld2015-02-09
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui-clone.c: Fix path checkLukas Fleischer2015-02-09
| | | | | | | | | | | The starts_with() check was broken in two ways: For one thing, the parameters were passed in the wrong order, for another thing, starts_with() returns 1 if the string starts with the prefix (not 0). Note that this bug existed since commit 02a545e (Add support for cloning over http, 2008-08-06) but only pops in in corner cases. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
* Return proper HTTP response when accessing info/Lukas Fleischer2015-01-15
| | | | | | | | | | | Currently, when a user directly accesses the info command of a repository, we exit cgit without printing anything to stdout, bringing up error messages like "502 Bad Gateway" or "An error occurred while reading CGI reply (no response received)". Instead of bailing out, at least print the HTTP headers, including a reasonable error message. Reported-by: Janus Troelsen Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
* git: update for git 2.0Christian Hesse2014-06-28
| | | | | | | prefixcmp() and suffixcmp() have been remove, functionality is now provided by starts_with() and ends_with(). Retrurn values have been changed, so instead of just renaming we have to fix logic. Everything else looks just fine.
* Switch to exclusively using global ctxLukas Fleischer2014-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update copyright informationLukas Fleischer2014-01-08
| | | | | | | | | * Name "cgit Development Team" as copyright holder to avoid listing every single developer. * Update copyright ranges. Signed-off-by: Lukas Fleischer <cgit@crytocrack.de>
* Always #include corresponding .h in .c filesJohn Keeping2013-04-08
| | | | | | | | | | | | While doing this, remove declarations from header files where the corresponding definition is declared "static" in order to avoid build errors. Also re-order existing headers in ui-*.c so that the file-specific header always comes immediately after "cgit.h", helping with future consistency. Signed-off-by: John Keeping <john@keeping.me.uk>
* Support unannotated tags in git-clone.Jason A. Donenfeld2013-02-01
| | | | | | | | | | | | | | | | | | | Matthew McClintock reported that older unannotated tags were not correctly being cloned and did not appear in info/refs. Further investigation revealed some dubious prefix comparison code for determining whether or not to write refs in info/refs. After comparing it with git's own http-backend.c, it appears upstream does not use this prefix logic. OTOH, I don't know what the reasoning was when the prefix logic was introduced. It appears to me to just be buggy, though it's possible there are other reasons, and we'll have to revisit this commit. But for now, Works For Me. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Matthew McClintock <msm@freescale.com> Reported-by: Matthew McClintock <msm@freescale.com>
* Supply status description to html_status()Lars Hjemli2008-08-06
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add support for cloning over httpLars Hjemli2008-08-06
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>