diff options
Diffstat (limited to 'ui-repolist.c')
-rw-r--r-- | ui-repolist.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 6f304bb..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 | } |