diff options
Diffstat (limited to '')
-rw-r--r--source/cgit.c9
1 file changed, 2 insertions, 7 deletions
diff --git a/source/cgit.c b/source/cgit.c
index 82c496e..b26a528 100644
--- a/source/cgit.c
+++ b/source/cgit.c
@@ -319,7 +319,6 @@ static void parse_args(int argc, const char **argv)
ctx.qry.page = xstrdup(arg);
} else if (skip_prefix(argv[i], "--head=", &arg)) {
ctx.qry.head = xstrdup(arg);
- ctx.qry.has_symref = 1;
} else if (skip_prefix(argv[i], "--oid=", &arg)) {
ctx.qry.oid = xstrdup(arg);
ctx.qry.has_oid = 1;
@@ -760,7 +759,6 @@ static void apply_query_param(const char *name, const char *value)
ctx.qry.search = xstrdup(value);
} else if (!strcmp(name, "h")) {
ctx.qry.head = xstrdup(value);
- ctx.qry.has_symref = 1;
} else if (!strcmp(name, "id")) {
ctx.qry.oid = xstrdup(value);
ctx.qry.has_oid = 1;
@@ -918,7 +916,7 @@ static int calc_ttl(void)
if (!ctx.repo)
return ctx.cfg.cache_index_ttl;
- if (!ctx.qry.page)
+ if (!ctx.qry.page || !strcmp(ctx.qry.page, "summary"))
return ctx.cfg.cache_summary_ttl;
// The dumb transport serves files that already sit on the disk, so a
@@ -944,10 +942,7 @@ static int calc_ttl(void)
if (!strcmp(ctx.qry.page, "snapshot"))
return ctx.cfg.cache_snapshot_ttl;
- if (ctx.qry.has_symref)
- return ctx.cfg.cache_dynamic_ttl;
-
- return ctx.cfg.cache_summary_ttl;
+ return ctx.cfg.cache_dynamic_ttl;
}
/*