diff options
author | Lars Hjemli <hjemli@gmail.com> | 2012-03-19 06:00:18 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2012-03-19 06:00:18 (JST) |
commit | 181b6e789b79fc385e5ec75b2b83f01192d54051 (patch) | |
tree | 8888b5eb9c6674b69bcb8f508f9d6f548fc1fed3 /ui-repolist.c | |
parent | 2b9fab8d30420d935745c4d84ea22412ab2485e5 (diff) | |
parent | 5293c8b7992bf3211b6bde7acbbd4e74ffd926d4 (diff) | |
download | cgit-181b6e789b79fc385e5ec75b2b83f01192d54051.zip cgit-181b6e789b79fc385e5ec75b2b83f01192d54051.tar.gz |
Merge branch 'jp/defbranch'
Diffstat (limited to 'ui-repolist.c')
-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) | |||
45 | return 1; | 45 | return 1; |
46 | } | 46 | } |
47 | 47 | ||
48 | path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch); | 48 | path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch ? |
49 | repo->defbranch : "master"); | ||
49 | if (stat(path, &s) == 0) { | 50 | if (stat(path, &s) == 0) { |
50 | *mtime = s.st_mtime; | 51 | *mtime = s.st_mtime; |
51 | r->mtime = *mtime; | 52 | r->mtime = *mtime; |