aboutsummaryrefslogtreecommitdiffstats
path: root/ui-blob.c
Commit message (Expand)AuthorAgeFilesLines
* Always #include corresponding .h in .c files•••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> John Keeping2013-04-081-0/+1
* ui-blob: don't segfault when no path is given•••It it possible to inspect blobs by specifying only the SHA-1, and CGit provides links to do so, for example if a tag points directly at a blob. In this case the path_items structure is never used, but creating it still causes strlen to be run on a null pointer. Fix this. This error was introduced by commit c1633c6 (Update git to v1.7.6.5 - 2013-03-02). Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-04-071-1/+1
* ui-blob.c: Use a context structure in walk_tree()•••Do not misuse global variables to save the context. Instead, use the context pointer which was designed to share information between a read_tree_fn and the caller. This also prevents from potential misuse of the global pointers match_path and matched_sha1 after the referenced values have been overwritten on the stack. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-16/+26
* White space around control verbs.•••Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Jason A. Donenfeld2013-03-041-4/+4
* Fix several whitespace errors•••* Remove whitespace at the end of lines. * Replace space indentation by tabs. * Add whitespace before/after several operators ("+", "-", "*", ...) * Add whitespace to assignments ("foo = bar;"). * Fix whitespace in parameter lists ("foobar(foo, bar, 42)"). Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> Lukas Fleischer2013-03-041-5/+5
* Update git to v1.7.6.5•••struct pathspec is now used in more places. Signed-off-by: John Keeping <john@keeping.me.uk> John Keeping2013-03-021-4/+18
* prefer html_raw() to write()•••To make the code more consistent, and to not rely on the implementation of html(), always use html_raw(...) instead of write(htmlfd, ...). Signed-off-by: Mark Lodato <lodatom@gmail.com> Mark Lodato2010-09-041-2/+2
* Support refspecs in about-filter.•••Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Jason A. Donenfeld2010-08-201-1/+34
* Fix segfault on ppc when browsing treeMartins Polakovs2009-12-121-1/+1
* ui-blob: return 'application/octet-stream' for binary blobs•••Signed-off-by: Lars Hjemli <hjemli@gmail.com> Lars Hjemli2009-07-251-1/+7
* Adjust to new calling convention for read_tree_recursive()•••In GIT-1.6.0, read_tree_recursive takes an extra void pointer for callback data. We might want to use this to avoid some global variables, but for now lets just make sure that we can still compile. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Lars Hjemli2008-07-211-2/+3
* allow specification of directly linked blobs mimetypes•••Signed-off-by: Michael Krelin <hacker@klever.net> Michael Krelin2008-06-241-1/+1
* allow blob extract blobs by head/path combination••• If blob is invoked with no id=, it tries to look up h= and search for path= in there. Once found, proceed as normal, otherwise, fail as normal. Signed-off-by: Michael Krelin <hacker@klever.net> Michael Krelin2008-06-241-4/+33
* Don't specify mimetype in ui-blob.c•••But be sure to specify correct filename. This way, the client can hopefully guess a sensible mimetype based on the filename suffix, and cgit can ignore the issue altogether. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Lars Hjemli2008-04-081-1/+1
* Add ui-shared.h•••This is finally a proper headerfile for the shared ui-functions which used to reside in cgit.h Signed-off-by: Lars Hjemli <hjemli@gmail.com> Lars Hjemli2008-03-241-0/+1
* Remove obsolete cacheitem parameter to ui-functions•••This parameter hasn't been used for a very long time... Signed-off-by: Lars Hjemli <hjemli@gmail.com> Lars Hjemli2008-03-241-1/+1
* Add struct cgit_page to cgit_context•••This struct is used when generating http headers, and as such is another small step towards the goal of the whole cleanup series; to invoke each page/view function with a function pointer. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Lars Hjemli2008-03-241-1/+3
* Introduce html.h•••All html-functions can be quite easily separated from the rest of cgit, so lets do it; the only issue was html_filemode which uses some git-defined macros so the function is moved into ui-shared.c::cgit_print_filemode(). Signed-off-by: Lars Hjemli <hjemli@gmail.com> Lars Hjemli2008-03-181-0/+9
* Add support for downloading single blobs•••Signed-off-by: Lars Hjemli <hjemli@gmail.com> Lars Hjemli2007-05-091-0/+31