]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-repolist.c
Merge branch 'jp/defbranch'
[ps-cgit] / ui-repolist.c
index a09a6894442ca546b08b55f51f5ec2f3403b4d51..d946f32cd5354021c45637a0af24e1a7653dff92 100644 (file)
@@ -45,7 +45,8 @@ static int get_repo_modtime(const struct cgit_repo *repo, time_t *mtime)
                return 1;
        }
 
-       path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch);
+       path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch ?
+                  repo->defbranch : "master");
        if (stat(path, &s) == 0) {
                *mtime = s.st_mtime;
                r->mtime = *mtime;