aboutsummaryrefslogtreecommitdiffstats
path: root/ui-clone.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* clone: use cgit_print_error_page() instead of html_status()John Keeping2015-08-141-5/+5
| | | | | | | This provides a formatted error response rather than a simple HTTP error. Signed-off-by: John Keeping <john@keeping.me.uk>
* git: update to v2.5.0Christian Hesse2015-08-121-4/+4
| | | | | | | | | | | | | | | Update to git version v2.5.0. * Upstream commit 5455ee0573a22bb793a7083d593ae1ace909cd4c (Merge branch 'bc/object-id') changed API: for_each_ref() callback functions were taught to name the objects not with "unsigned char sha1[20]" but with "struct object_id". * Upstream commit dcf692625ac569fefbe52269061230f4fde10e47 (path.c: make get_pathname() call sites return const char *) Signed-off-by: Christian Hesse <mail@eworm.de>
* ui-clone.c: Fix off-by-one error in pack pathJason A. Donenfeld2015-02-091-5/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui-clone.c: Fix path checkLukas Fleischer2015-02-091-2/+2
| | | | | | | | | | | 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-151-1/+3
| | | | | | | | | | | 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-281-1/+1
| | | | | | | 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-171-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-081-1/+1
| | | | | | | | | * 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-081-0/+1
| | | | | | | | | | | | 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-011-4/+2
| | | | | | | | | | | | | | | | | | | 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-061-6/+4
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add support for cloning over httpLars Hjemli2008-08-061-0/+104
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>