about summary refs log tree commit diff stats
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cgit.c b/cgit.c index d8ea221..40825cb 100644 --- a/cgit.c +++ b/cgit.c
@@ -324,11 +324,11 @@ static void querystring_cb(const char *name, const char *value)
324 ctx.qry.head = xstrdup(value); 324 ctx.qry.head = xstrdup(value);
325 ctx.qry.has_symref = 1; 325 ctx.qry.has_symref = 1;
326 } else if (!strcmp(name, "id")) { 326 } else if (!strcmp(name, "id")) {
327 ctx.qry.sha1 = xstrdup(value); 327 ctx.qry.oid = xstrdup(value);
328 ctx.qry.has_sha1 = 1; 328 ctx.qry.has_oid = 1;
329 } else if (!strcmp(name, "id2")) { 329 } else if (!strcmp(name, "id2")) {
330 ctx.qry.sha2 = xstrdup(value); 330 ctx.qry.oid2 = xstrdup(value);
331 ctx.qry.has_sha1 = 1; 331 ctx.qry.has_oid = 1;
332 } else if (!strcmp(name, "ofs")) { 332 } else if (!strcmp(name, "ofs")) {
333 ctx.qry.ofs = atoi(value); 333 ctx.qry.ofs = atoi(value);
334 } else if (!strcmp(name, "path")) { 334 } else if (!strcmp(name, "path")) {
@@ -992,9 +992,9 @@ static void cgit_parse_args(int argc, const char **argv)
992 } else if (skip_prefix(argv[i], "--head=", &arg)) { 992 } else if (skip_prefix(argv[i], "--head=", &arg)) {
993 ctx.qry.head = xstrdup(arg); 993 ctx.qry.head = xstrdup(arg);
994 ctx.qry.has_symref = 1; 994 ctx.qry.has_symref = 1;
995 } else if (skip_prefix(argv[i], "--sha1=", &arg)) { 995 } else if (skip_prefix(argv[i], "--oid=", &arg)) {
996 ctx.qry.sha1 = xstrdup(arg); 996 ctx.qry.oid = xstrdup(arg);
997 ctx.qry.has_sha1 = 1; 997 ctx.qry.has_oid = 1;
998 } else if (skip_prefix(argv[i], "--ofs=", &arg)) { 998 } else if (skip_prefix(argv[i], "--ofs=", &arg)) {
999 ctx.qry.ofs = atoi(arg); 999 ctx.qry.ofs = atoi(arg);
1000 } else if (skip_prefix(argv[i], "--scan-tree=", &arg) || 1000 } else if (skip_prefix(argv[i], "--scan-tree=", &arg) ||
@@ -1037,7 +1037,7 @@ static int calc_ttl(void)
1037 if (!strcmp(ctx.qry.page, "snapshot")) 1037 if (!strcmp(ctx.qry.page, "snapshot"))
1038 return ctx.cfg.cache_snapshot_ttl; 1038 return ctx.cfg.cache_snapshot_ttl;
1039 1039
1040 if (ctx.qry.has_sha1) 1040 if (ctx.qry.has_oid)
1041 return ctx.cfg.cache_static_ttl; 1041 return ctx.cfg.cache_static_ttl;
1042 1042
1043 if (ctx.qry.has_symref) 1043 if (ctx.qry.has_symref)