From mboxrd@z Thu Jan 1 00:00:00 1970 From: jugg at hotmail.com (chris) Date: Tue, 19 Jul 2011 09:35:42 +0000 (UTC) Subject: [PATCH] guess default branch from HEAD References: <20110407104958.GB1004@plenz.com> <1302173964-12520-1-git-send-email-plenz@cis.fu-berlin.de> <20110613101621.GA29265@hjemli.net> <20110616145921.GA5875@plenz.com> <20110719063058.GA7524@hjemli.net> Message-ID: > writes: > On Sat, Jul 09, 2011 at 08:09:57AM +0000, chris wrote: > > the index page 'idle' times no longer show up (the idle column is blank). > > Thanks for noticing. I think the following patch will fix the issue: > > 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; > > -- > larsh This patch corrected the problem of the idle times being empty on the index page. It is a little strange to have the idle time not use the default branch. Should guess_defbranch() be called here instead of hard-coding "master"? chris