From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8643 invoked from network); 21 Aug 2020 16:01:35 -0000 Received: from krantz.zx2c4.com (192.95.5.69) by inbox.vuxu.org with ESMTPUTF8; 21 Aug 2020 16:01:35 -0000 Received: by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 4ecc88fc; Fri, 21 Aug 2020 15:34:58 +0000 (UTC) Return-Path: Received: from mta02.prd.rdg.aluminati.org (mta02.prd.rdg.aluminati.org [94.76.243.215]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id 1c995214 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Fri, 21 Aug 2020 15:34:55 +0000 (UTC) Received: from mta02.prd.rdg.aluminati.org (localhost [127.0.0.1]) by mta.aluminati.local (Postfix) with ESMTP id 045F71FF61; Fri, 21 Aug 2020 17:01:29 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mta02.prd.rdg.aluminati.org (Postfix) with ESMTP id F3CF61D5; Fri, 21 Aug 2020 17:01:28 +0100 (BST) X-Quarantine-ID: X-Virus-Scanned: Debian amavisd-new at mta02.prd.rdg.aluminati.org Received: from mta.aluminati.local ([127.0.0.1]) by localhost (mta02.prd.rdg.aluminati.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zY7oTSMGfbIZ; Fri, 21 Aug 2020 17:01:28 +0100 (BST) Received: from john.keeping.me.uk (unknown [81.174.171.191]) by mta02.prd.rdg.aluminati.org (Postfix) with ESMTPSA id F16441CA; Fri, 21 Aug 2020 17:01:22 +0100 (BST) Date: Fri, 21 Aug 2020 17:01:20 +0100 From: John Keeping To: =?iso-8859-1?Q?Fran=E7ois?= Kooman Cc: cgit@lists.zx2c4.com Subject: Re: renamed default branch, no "Idle" value on index at all Message-ID: <20200821160120.GB11891@john.keeping.me.uk> References: <943afd96-17df-df04-d143-0a2ef934cccc@tuxed.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <943afd96-17df-df04-d143-0a2ef934cccc@tuxed.net> Content-Transfer-Encoding: quoted-printable X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" On Thu, Aug 20, 2020 at 01:07:49PM +0200, Fran=E7ois Kooman wrote: > I switched the default branch from master to main in some of my=20 > repositories. However, it seems cgit does not consider this when=20 > determining "Idle" on the index page. It shows nothing in the column "I= dle". >=20 > The FAQ [1] has an entry about this, but I am not seeing what the FAQ=20 > describes...I modified the HEAD file in the repository on the server: >=20 > # git symbolic-ref HEAD refs/heads/main >=20 > Everything seems to work fine, cgit takes "main" as the default branch.= =20 > It seems cgit is hard coded to only look at "master" to determine idle=20 > on the index? It looks like the "guess default branch" logic isn't considered for the index page. If you set "repo.defbranch" in cgitrc (or via git config in the repositories) then you can manually specify the default branch and that will work everywhere. Alternatively you can use a hook to update an agefile and that will be read instead of the default branch. This also allows setting the last modified time to be the newest across a collection of branches. I had a quick look at guessing the default branch (from HEAD) for the repolist, but that's not simple because it requires initialising Git in each repository (see cgit.c::guess_defbranch() which is used for repo pages). John