Author: Christian Hesse <mail@eworm.de>
global: remove functionality we deprecated for cgit v1.0 The man page states these were deprecated for v1.0. We are past v1.1, so remove the functionality. Signed-off-by: Christian Hesse <mail@eworm.de> Reviewed-by: John Keeping <john@keeping.me.uk>
cgit.c | 17 +++-------------- cgit.h | 3 --- cgitrc.5.txt | 21 --------------------- ui-repolist.c | 3 --- ui-shared.c | 2 --
diff --git a/cgit.c b/cgit.c index ca0a89c0a17d7b23bfb7facb2299ca537242ad9d..223dfc8164b913d36a97534d48ab89fb4a650a70 100644 --- a/cgit.c +++ b/cgit.c @@ -111,7 +111,7 @@ static void config_cb(const char *name, const char *value) { const char *arg; - if (!strcmp(name, "section") || !strcmp(name, "repo.group")) + if (!strcmp(name, "section")) ctx.cfg.section = xstrdup(value); else if (!strcmp(name, "repo.url")) ctx.repo = cgit_add_repo(value); @@ -139,20 +139,14 @@ else if (!strcmp(name, "header")) ctx.cfg.header = xstrdup(value); else if (!strcmp(name, "logo")) ctx.cfg.logo = xstrdup(value); - else if (!strcmp(name, "index-header")) - ctx.cfg.index_header = xstrdup(value); - else if (!strcmp(name, "index-info")) - ctx.cfg.index_info = xstrdup(value); else if (!strcmp(name, "logo-link")) ctx.cfg.logo_link = xstrdup(value); else if (!strcmp(name, "module-link")) ctx.cfg.module_link = xstrdup(value); else if (!strcmp(name, "strict-export")) ctx.cfg.strict_export = xstrdup(value); - else if (!strcmp(name, "virtual-root")) { + else if (!strcmp(name, "virtual-root")) ctx.cfg.virtual_root = ensure_end(value, '/'); - } else if (!strcmp(name, "nocache")) - ctx.cfg.nocache = atoi(value); else if (!strcmp(name, "noplainemail")) ctx.cfg.noplainemail = atoi(value); else if (!strcmp(name, "noheader")) @@ -236,7 +230,7 @@ ctx.cfg.max_commit_count = atoi(value); else if (!strcmp(name, "project-list")) ctx.cfg.project_list = xstrdup(expand_macros(value)); else if (!strcmp(name, "scan-path")) - if (!ctx.cfg.nocache && ctx.cfg.cache_size) + if (ctx.cfg.cache_size) process_cached_repolist(expand_macros(value)); else if (ctx.cfg.project_list) scan_projects(expand_macros(value), @@ -355,7 +349,6 @@ static void prepare_context(void) { memset(&ctx, 0, sizeof(ctx)); ctx.cfg.agefile = "info/web/last-modified"; - ctx.cfg.nocache = 0; ctx.cfg.cache_size = 0; ctx.cfg.cache_max_create_time = 5; ctx.cfg.cache_root = CGIT_CACHE_ROOT; @@ -973,8 +966,6 @@ exit(0); } if (skip_prefix(argv[i], "--cache=", &arg)) { ctx.cfg.cache_root = xstrdup(arg); - } else if (!strcmp(argv[i], "--nocache")) { - ctx.cfg.nocache = 1; } else if (!strcmp(argv[i], "--nohttp")) { ctx.env.no_http = "1"; } else if (skip_prefix(argv[i], "--query=", &arg)) { @@ -1095,8 +1086,6 @@ ctx.page.expires += 10 * 365 * 24 * 60 * 60; /* 10 years */ else ctx.page.expires += ttl * 60; if (!ctx.env.authenticated || (ctx.env.request_method && !strcmp(ctx.env.request_method, "HEAD"))) - ctx.cfg.nocache = 1; - if (ctx.cfg.nocache) ctx.cfg.cache_size = 0; err = cache_process(ctx.cfg.cache_size, ctx.cfg.cache_root, ctx.qry.raw, ttl, process_request); diff --git a/cgit.h b/cgit.h index 0798dc5ce2e688775bd671cc610a0bf8f7941720..6feca688d91c3b09121bd4776720471bffbba76b 100644 --- a/cgit.h +++ b/cgit.h @@ -197,8 +197,6 @@ char *favicon; char *footer; char *head_include; char *header; - char *index_header; - char *index_info; char *logo; char *logo_link; char *mimetype_file; @@ -248,7 +246,6 @@ int max_msg_len; int max_repodesc_len; int max_blob_size; int max_stats; - int nocache; int noplainemail; int noheader; int renamelimit; diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 3bfacfa0e0a8829f8d1d0a7cd1c14f43015b387d..acfae91c58c79df7aaf7ba9cb861fd8aae7ef4c4 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -238,18 +238,6 @@ include:: Name of a configfile to include before the rest of the current config- file is parsed. Default value: none. See also: "MACRO EXPANSION". -index-header:: - The content of the file specified with this option will be included - verbatim above the repository index. This setting is deprecated, and - will not be supported by cgit-1.0 (use root-readme instead). Default - value: none. - -index-info:: - The content of the file specified with this option will be included - verbatim below the heading on the repository index page. This setting - is deprecated, and will not be supported by cgit-1.0 (use root-desc - instead). Default value: none. - local-time:: Flag which, if set to "1", makes cgit print commit and tag times in the servers timezone. Default value: "0". @@ -323,11 +311,6 @@ submodule is printed in a directory listing. The arguments for the formatstring are the path and SHA1 of the submodule commit. Default value: none. -nocache:: - If set to the value "1" caching will be disabled. This settings is - deprecated, and will not be honored starting with cgit-1.0. Default - value: "0". - noplainemail:: If set to "1" showing full author email addresses will be disabled. Default value: "0". @@ -358,10 +341,6 @@ renamelimit:: Maximum number of files to consider when detecting renames. The value "-1" uses the compiletime value in git (for further info, look at `man git-diff`). Default value: "-1". - -repo.group:: - Legacy alias for "section". This option is deprecated and will not be - supported in cgit-1.0. repository-sort:: The way in which repositories in each section are sorted. Valid values diff --git a/ui-repolist.c b/ui-repolist.c index af52f9ba0c6459de7c899d5f15a86b3e9948f3d7..41424c0881dee009816a3effc75ef1d116f06955 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -288,9 +288,6 @@ cgit_print_http_headers(); cgit_print_docstart(); cgit_print_pageheader(); - if (ctx.cfg.index_header) - html_include(ctx.cfg.index_header); - if (ctx.qry.sort) sorted = sort_repolist(ctx.qry.sort); else if (ctx.cfg.section_sort) diff --git a/ui-shared.c b/ui-shared.c index e8c0723c75fc84958c230b1eee3824382ca69f66..a63dcb041d99cdf65d101bd98bcc19059e329d94 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -977,8 +977,6 @@ html_txt(ctx.repo->owner); } else { if (ctx.cfg.root_desc) html_txt(ctx.cfg.root_desc); - else if (ctx.cfg.index_info) - html_include(ctx.cfg.index_info); } html("</td></tr></table>\n"); }