diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Date a reftable repository on the index
The idle column falls back on the mtime of the branch's loose ref or of packed-refs, and a reftable repository has neither, so its cell stayed empty. Git rewrites reftable/tables.list on every ref update.
Diffstat (limited to 'source')
-rw-r--r--source/ui-repolist.c10
1 file changed, 10 insertions, 0 deletions
diff --git a/source/ui-repolist.c b/source/ui-repolist.c
index 1c081c7..99474c1 100644
--- a/source/ui-repolist.c
+++ b/source/ui-repolist.c
@@ -115,6 +115,16 @@ static int get_repo_modtime(const struct cgit_repo *repo, time_t *mtime)
goto end;
}
+ // A reftable repository has neither file, but rewrites this list on
+ // every ref update.
+ strbuf_reset(&path);
+ strbuf_addf(&path, "%s/reftable/tables.list", repo->path);
+ if (stat(path.buf, &st) == 0) {
+ *mtime = st.st_mtime;
+ writable->mtime = *mtime;
+ goto end;
+ }
+
*mtime = 0;
writable->mtime = *mtime;
end: