From aa69de50d3c0ef30a2f97e95f0582445890d027b Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Thu, 30 Jun 2016 21:06:46 +0100 Subject: Allow agefile to be set per-repository This adds "repo.agefile", since namespaced repositories share the same files, and we'd like to be able to see the ages of the refs for each namespace. Whatever the git server uses for updating the age file must be namespace aware and must write the age file to a path consistent with "repo.agefile". Signed-off-by: Richard Maw --- ui-repolist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui-repolist.c') diff --git a/ui-repolist.c b/ui-repolist.c index 30915df..6b1afb6 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -42,7 +42,8 @@ static int get_repo_modtime(const struct cgit_repo *repo, time_t *mtime) *mtime = repo->mtime; return 1; } - strbuf_addf(&path, "%s/%s", repo->path, ctx.cfg.agefile); + strbuf_addf(&path, "%s/%s", repo->path, + repo->agefile ? repo->agefile : ctx.cfg.agefile); if (stat(path.buf, &s) == 0) { *mtime = read_agefile(path.buf); if (*mtime) { -- cgit v1.2.3