diff options
author | Christian Hesse | 2018-06-18 11:48:43 +0200 |
---|---|---|
committer | Jason A. Donenfeld | 2018-06-27 18:13:03 +0200 |
commit | 54d37dc154f5308459df0a90c81dabd0245b6c17 (patch) | |
tree | 6a4ab44d3dc6f51ea9f417206721ec648bea67f9 /cgit.c | |
parent | 2f8648ff7f5c7119ab035c134504f04eefe068fb (diff) | |
download | cgit-54d37dc154f5308459df0a90c81dabd0245b6c17.tar.gz cgit-54d37dc154f5308459df0a90c81dabd0245b6c17.tar.bz2 cgit-54d37dc154f5308459df0a90c81dabd0245b6c17.zip |
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>
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -111,7 +111,7 @@ static void config_cb(const char *name, const char *value) | |||
111 | { | 111 | { |
112 | const char *arg; | 112 | const char *arg; |
113 | 113 | ||
114 | if (!strcmp(name, "section") || !strcmp(name, "repo.group")) | 114 | if (!strcmp(name, "section")) |
115 | ctx.cfg.section = xstrdup(value); | 115 | ctx.cfg.section = xstrdup(value); |
116 | else if (!strcmp(name, "repo.url")) | 116 | else if (!strcmp(name, "repo.url")) |
117 | ctx.repo = cgit_add_repo(value); | 117 | ctx.repo = cgit_add_repo(value); |
@@ -139,20 +139,14 @@ static void config_cb(const char *name, const char *value) | |||
139 | ctx.cfg.header = xstrdup(value); | 139 | ctx.cfg.header = xstrdup(value); |
140 | else if (!strcmp(name, "logo")) | 140 | else if (!strcmp(name, "logo")) |
141 | ctx.cfg.logo = xstrdup(value); | 141 | ctx.cfg.logo = xstrdup(value); |
142 | else if (!strcmp(name, "index-header")) | ||
143 | ctx.cfg.index_header = xstrdup(value); | ||
144 | else if (!strcmp(name, "index-info")) | ||
145 | ctx.cfg.index_info = xstrdup(value); | ||
146 | else if (!strcmp(name, "logo-link")) | 142 | else if (!strcmp(name, "logo-link")) |
147 | ctx.cfg.logo_link = xstrdup(value); | 143 | ctx.cfg.logo_link = xstrdup(value); |
148 | else if (!strcmp(name, "module-link")) | 144 | else if (!strcmp(name, "module-link")) |
149 | ctx.cfg.module_link = xstrdup(value); | 145 | ctx.cfg.module_link = xstrdup(value); |
150 | else if (!strcmp(name, "strict-export")) | 146 | else if (!strcmp(name, "strict-export")) |
151 | ctx.cfg.strict_export = xstrdup(value); | 147 | ctx.cfg.strict_export = xstrdup(value); |
152 | else if (!strcmp(name, "virtual-root")) { | 148 | else if (!strcmp(name, "virtual-root")) |
153 | ctx.cfg.virtual_root = ensure_end(value, '/'); | 149 | ctx.cfg.virtual_root = ensure_end(value, '/'); |
154 | } else if (!strcmp(name, "nocache")) | ||
155 | ctx.cfg.nocache = atoi(value); | ||
156 | else if (!strcmp(name, "noplainemail")) | 150 | else if (!strcmp(name, "noplainemail")) |
157 | ctx.cfg.noplainemail = atoi(value); | 151 | ctx.cfg.noplainemail = atoi(value); |
158 | else if (!strcmp(name, "noheader")) | 152 | else if (!strcmp(name, "noheader")) |
@@ -236,7 +230,7 @@ static void config_cb(const char *name, const char *value) | |||
236 | else if (!strcmp(name, "project-list")) | 230 | else if (!strcmp(name, "project-list")) |
237 | ctx.cfg.project_list = xstrdup(expand_macros(value)); | 231 | ctx.cfg.project_list = xstrdup(expand_macros(value)); |
238 | else if (!strcmp(name, "scan-path")) | 232 | else if (!strcmp(name, "scan-path")) |
239 | if (!ctx.cfg.nocache && ctx.cfg.cache_size) | 233 | if (ctx.cfg.cache_size) |
240 | process_cached_repolist(expand_macros(value)); | 234 | process_cached_repolist(expand_macros(value)); |
241 | else if (ctx.cfg.project_list) | 235 | else if (ctx.cfg.project_list) |
242 | scan_projects(expand_macros(value), | 236 | scan_projects(expand_macros(value), |
@@ -355,7 +349,6 @@ static void prepare_context(void) | |||
355 | { | 349 | { |
356 | memset(&ctx, 0, sizeof(ctx)); | 350 | memset(&ctx, 0, sizeof(ctx)); |
357 | ctx.cfg.agefile = "info/web/last-modified"; | 351 | ctx.cfg.agefile = "info/web/last-modified"; |
358 | ctx.cfg.nocache = 0; | ||
359 | ctx.cfg.cache_size = 0; | 352 | ctx.cfg.cache_size = 0; |
360 | ctx.cfg.cache_max_create_time = 5; | 353 | ctx.cfg.cache_max_create_time = 5; |
361 | ctx.cfg.cache_root = CGIT_CACHE_ROOT; | 354 | ctx.cfg.cache_root = CGIT_CACHE_ROOT; |
@@ -973,8 +966,6 @@ static void cgit_parse_args(int argc, const char **argv) | |||
973 | } | 966 | } |
974 | if (skip_prefix(argv[i], "--cache=", &arg)) { | 967 | if (skip_prefix(argv[i], "--cache=", &arg)) { |
975 | ctx.cfg.cache_root = xstrdup(arg); | 968 | ctx.cfg.cache_root = xstrdup(arg); |
976 | } else if (!strcmp(argv[i], "--nocache")) { | ||
977 | ctx.cfg.nocache = 1; | ||
978 | } else if (!strcmp(argv[i], "--nohttp")) { | 969 | } else if (!strcmp(argv[i], "--nohttp")) { |
979 | ctx.env.no_http = "1"; | 970 | ctx.env.no_http = "1"; |
980 | } else if (skip_prefix(argv[i], "--query=", &arg)) { | 971 | } else if (skip_prefix(argv[i], "--query=", &arg)) { |
@@ -1095,8 +1086,6 @@ int cmd_main(int argc, const char **argv) | |||
1095 | else | 1086 | else |
1096 | ctx.page.expires += ttl * 60; | 1087 | ctx.page.expires += ttl * 60; |
1097 | if (!ctx.env.authenticated || (ctx.env.request_method && !strcmp(ctx.env.request_method, "HEAD"))) | 1088 | if (!ctx.env.authenticated || (ctx.env.request_method && !strcmp(ctx.env.request_method, "HEAD"))) |
1098 | ctx.cfg.nocache = 1; | ||
1099 | if (ctx.cfg.nocache) | ||
1100 | ctx.cfg.cache_size = 0; | 1089 | ctx.cfg.cache_size = 0; |
1101 | err = cache_process(ctx.cfg.cache_size, ctx.cfg.cache_root, | 1090 | err = cache_process(ctx.cfg.cache_size, ctx.cfg.cache_root, |
1102 | ctx.qry.raw, ttl, process_request); | 1091 | ctx.qry.raw, ttl, process_request); |