Этот коммит содержится в:
Lars Hjemli
2012-03-18 21:00:18 +00:00
родитель 2b9fab8d30 5293c8b799
Коммит 181b6e789b
4 изменённых файлов: 18 добавлений и 4 удалений

Просмотреть файл

@ -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;