From 73c6f3fe95cc426ceb3e6917d36f07e7cf114d02 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 17 Oct 2026 12:53:19 -1000 Subject: Give a repository without a path no age The index built its paths from a NULL repo.path, which the C library prints as "(null)", so it looked for refs under that name in the working directory. --- source/ui-repolist.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/ui-repolist.c') diff --git a/source/ui-repolist.c b/source/ui-repolist.c index 99474c1..24d5479 100644 --- a/source/ui-repolist.c +++ b/source/ui-repolist.c @@ -89,6 +89,12 @@ static int get_repo_modtime(const struct cgit_repo *repo, time_t *mtime) *mtime = repo->mtime; return 1; } + // A repository configured without a path has nothing on disk to date. + if (!repo->path) { + *mtime = 0; + writable->mtime = 0; + return 0; + } strbuf_addf(&path, "%s/%s", repo->path, ctx.cfg.agefile); if (stat(path.buf, &st) == 0) { *mtime = read_agefile(path.buf); -- cgit