X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/1b1bf635b59a349a9238a1d63a21d03d9949e185..5293c8b7992bf3211b6bde7acbbd4e74ffd926d4:/ui-repolist.c?ds=inline diff --git a/ui-repolist.c b/ui-repolist.c index 25c36ce..f21d28d 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -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;