diff options
| author | Lars Hjemli <hjemli@gmail.com> | 2012-03-18 21:00:18 +0000 | 
|---|---|---|
| committer | Lars Hjemli <hjemli@gmail.com> | 2012-03-18 21:00:18 +0000 | 
| commit | 181b6e789b79fc385e5ec75b2b83f01192d54051 (patch) | |
| tree | 8888b5eb9c6674b69bcb8f508f9d6f548fc1fed3 /ui-repolist.c | |
| parent | Merge branch 'lh/module-links' (diff) | |
| parent | ui-repolist.c: fallback to "master" if no default branch is specified (diff) | |
| download | cgit-181b6e789b79fc385e5ec75b2b83f01192d54051.tar.gz cgit-181b6e789b79fc385e5ec75b2b83f01192d54051.tar.bz2 cgit-181b6e789b79fc385e5ec75b2b83f01192d54051.zip | |
Merge branch 'jp/defbranch'
Diffstat (limited to '')
| -rw-r--r-- | ui-repolist.c | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/ui-repolist.c b/ui-repolist.c index a09a689..d946f32 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; | 
