]> git.cameronkatri.com Git - cgit.git/blobdiff - shared.c
ui-repolist: implement lazy caching of repo->mtime
[cgit.git] / shared.c
index 48002accd987129bb72f62b9fc0b5d6a05bcf174..89d1bab90f9e6d4f53ee873dfffb4fb9515bedbd 100644 (file)
--- a/shared.c
+++ b/shared.c
@@ -60,6 +60,7 @@ struct cgit_repo *cgit_add_repo(const char *url)
        ret->enable_log_linecount = ctx.cfg.enable_log_linecount;
        ret->module_link = ctx.cfg.module_link;
        ret->readme = NULL;
+       ret->mtime = -1;
        return ret;
 }
 
@@ -89,18 +90,6 @@ void *cgit_free_commitinfo(struct commitinfo *info)
        return NULL;
 }
 
-int hextoint(char c)
-{
-       if (c >= 'a' && c <= 'f')
-               return 10 + c - 'a';
-       else if (c >= 'A' && c <= 'F')
-               return 10 + c - 'A';
-       else if (c >= '0' && c <= '9')
-               return c - '0';
-       else
-               return -1;
-}
-
 char *trim_end(const char *str, char c)
 {
        int len;