mirror of
https://git.zx2c4.com/cgit
synced 2025-08-04 01:54:28 +02:00
Merge branch 'jp/defbranch'
This commit is contained in:
commit
181b6e789b
4 changed files with 18 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue