From mboxrd@z Thu Jan 1 00:00:00 1970 From: larsh at hjemli.net (larsh at hjemli.net) Date: Tue, 19 Jul 2011 06:30:58 +0000 Subject: [PATCH] guess default branch from HEAD In-Reply-To: References: <20110407104958.GB1004@plenz.com> <1302173964-12520-1-git-send-email-plenz@cis.fu-berlin.de> <20110613101621.GA29265@hjemli.net> <20110616145921.GA5875@plenz.com> Message-ID: <20110719063058.GA7524@hjemli.net> On Sat, Jul 09, 2011 at 08:09:57AM +0000, chris wrote: > Lars Hjemli writes: > > On Thu, Jun 16, 2011 at 16:59, Julius Plenz wrote: > > >> I can add a fixup patch on top of the patch from Julius if there's > > >> no objections to this plan. > > > > > > To the contrary, I'd appreciate your patch. Thanks. > > > > Your patch and my fixup is now part of the wip branch on hjemli.net/git/cgit. > > I've applied the following patch: > > http://hjemli.net/git/cgit/patch/?id=795118d4042d53566d8375dcabe20515e9135351 > > ontop of: > > http://hjemli.net/git/cgit/commit/?id=2a8f553163d642e60092ced20631e1020581273b > > and the index page 'idle' times no longer show up (the idle column is blank). > Each project's summary page 'Age' column still works just fine. > 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