about summary refs log tree commit diff stats
path: root/ui-repolist.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-repolist.c')
-rw-r--r--ui-repolist.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index e138f59..dce2eac 100644 --- a/ui-repolist.c +++ b/ui-repolist.c
@@ -46,11 +46,20 @@ static int get_repo_modtime(const struct cgit_repo *repo, time_t *mtime)
46 } 46 }
47 47
48 path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch); 48 path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch);
49 if (stat(path, &s) == 0) 49 if (stat(path, &s) == 0) {
50 *mtime = s.st_mtime; 50 *mtime = s.st_mtime;
51 else 51 r->mtime = *mtime;
52 *mtime = 0; 52 return 1;
53 }
54
55 path = fmt("%s/%s", repo->path, "packed-refs");
56 if (stat(path, &s) == 0) {
57 *mtime = s.st_mtime;
58 r->mtime = *mtime;
59 return 1;
60 }
53 61
62 *mtime = 0;
54 r->mtime = *mtime; 63 r->mtime = *mtime;
55 return (r->mtime != 0); 64 return (r->mtime != 0);
56} 65}
@@ -291,7 +300,7 @@ void cgit_print_site_readme()
291 if (!ctx.cfg.root_readme) 300 if (!ctx.cfg.root_readme)
292 return; 301 return;
293 if (ctx.cfg.about_filter) 302 if (ctx.cfg.about_filter)
294 cgit_open_filter(ctx.cfg.about_filter); 303 cgit_open_filter(ctx.cfg.about_filter, NULL);
295 html_include(ctx.cfg.root_readme); 304 html_include(ctx.cfg.root_readme);
296 if (ctx.cfg.about_filter) 305 if (ctx.cfg.about_filter)
297 cgit_close_filter(ctx.cfg.about_filter); 306 cgit_close_filter(ctx.cfg.about_filter);