Website Summary Files Commits Branches @commit @diff @stats
path: root / cmd.h
Commit message (Collapse)AuthorAgeLinesSHA
* cmd: no need for pre function hook now
 Jason A. Donenfeld
2015-08-14-2/+003de473
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* cmd: remove "want_layout" field
 John Keeping
2015-08-14-1/+0a420c7c
| | | | | | No commands use this any more. Signed-off-by: John Keeping <john@keeping.me.uk>
* about: always ensure page has a trailing slash
 Jason A. Donenfeld
2015-08-12-0/+2d703480
| | | | | | Otherwise we can't easily embed links to other /about/ pages. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Switch to exclusively using global ctx
 Lukas Fleischer
2014-01-17-2/+2f60ffa1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 is_clone flag to available commands
 Dan McGee
2011-02-19-1/+235d3301
| | | | | | | | This will be used to make these operations configurable via a config option. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* struct cgit_cmd: Differentiate between various usages of ctx.qry.path
 Johan Herland
2010-06-19-1/+20ff143d
| | | | | | | | | | | | | | | | | | For many commands/pages (e.g. 'tree', 'diff', 'plain', etc.), the ctx.qry.path argument is interpreted as a path within the "virtual" project directory structure. However, for some other commands (notably 'refs', and the clone-related commands) ctx.qry.path is used in a different context (as a more or less "real" path within the '.git' directory). This patch differentiates between these two usages of ctx.qry.path, by introducing a new variable - ctx.qry.vpath - which is equal to ctx.qry.path in the former case, and NULL in the latter. This will become useful in future patches when we want various pages and the links between them to preserve existing in-project paths. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add command dispatcher
 Lars Hjemli
2008-03-24-0/+15e0e4478
This simplifies the code in cgit.c and makes it easier to extend cgit with new pages/commands. Signed-off-by: Lars Hjemli <hjemli@gmail.com>