Diff options
Diffstat (limited to '')
| -rw-r--r-- | source/cgit.c | 30 |
1 file changed, 2 insertions, 28 deletions
diff --git a/source/cgit.c b/source/cgit.c index 715db59..3788d8a 100644 --- a/source/cgit.c +++ b/source/cgit.c @@ -886,33 +886,6 @@ static int is_full_oid(const char *rev) } /* - * Only these pages render the same bytes for the same id for ever. A log or - * refs page named with an id still lists branches and tags, which move. - */ -static int page_is_static(void) -{ - static const char *const pages[] = { - "blame", - "blob", - "commit", - "diff", - "patch", - "plain", - "rawdiff", - "snapshot", - "tag", - "tree", - }; - size_t i; - - for (i = 0; i < ARRAY_SIZE(pages); i++) { - if (!strcmp(ctx.qry.page, pages[i])) - return 1; - } - return 0; -} - -/* * Every cache-*-ttl setting is written in minutes, and so is this. */ static int calc_ttl(void) @@ -939,7 +912,8 @@ static int calc_ttl(void) // page to rebuild. if ( ctx.qry.has_oid && - page_is_static() && + cmd && + cmd->is_static && (!ctx.qry.oid || is_full_oid(ctx.qry.oid)) && (!ctx.qry.oid2 || is_full_oid(ctx.qry.oid2)) ) |
