mirror of
https://git.zx2c4.com/cgit
synced 2025-07-12 19:24:30 +02:00
Introduce struct cgit_context
This struct will hold all the cgit runtime information currently found in a multitude of global variables. The first cleanup removes all querystring-related variables. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
e5ed227ef0
commit
d14d77fe95
13 changed files with 156 additions and 164 deletions
|
@ -16,9 +16,9 @@ void cgit_print_refs()
|
|||
|
||||
html("<table class='list nowrap'>");
|
||||
|
||||
if (cgit_query_path && !strncmp(cgit_query_path, "heads", 5))
|
||||
if (ctx.qry.path && !strncmp(ctx.qry.path, "heads", 5))
|
||||
cgit_print_branches(0);
|
||||
else if (cgit_query_path && !strncmp(cgit_query_path, "tags", 4))
|
||||
else if (ctx.qry.path && !strncmp(ctx.qry.path, "tags", 4))
|
||||
cgit_print_tags(0);
|
||||
else {
|
||||
cgit_print_branches(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue