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=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24172 invoked from network); 25 Mar 2022 21:09:16 -0000 Received: from lists.zx2c4.com (165.227.139.114) by inbox.vuxu.org with ESMTPUTF8; 25 Mar 2022 21:09:16 -0000 Received: by lists.zx2c4.com (OpenSMTPD) with ESMTP id e4bac910; Fri, 25 Mar 2022 21:08:59 +0000 (UTC) Return-Path: Received: from mail.thenautilus.net (mail.thenautilus.net [5.79.87.27]) by lists.zx2c4.com (OpenSMTPD) with ESMTPS id 72ae4299 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Fri, 25 Mar 2022 21:08:56 +0000 (UTC) Received: (qmail 6620 invoked from network); 25 Mar 2022 21:08:46 -0000 Received: from unknown (HELO localhost) (dakkar@::ffff:10.111.0.42) by 0 with ESMTPA; 25 Mar 2022 21:08:46 -0000 Date: Fri, 25 Mar 2022 21:08:16 +0000 From: Gianni Ceccarelli To: cgit@lists.zx2c4.com Subject: Weird interactions betwen cache and module-link Message-ID: <20220325210816.6f89abb3@thenautilus.net> X-Mailer: Claws Mail 4.0.0git409 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" Hello! I use git submodules pretty often, and I like that cgit allows me to link them to their proper repository. For example, https://www.thenautilus.net/cgit/env-sensor/tree/ or https://www.thenautilus.net/cgit/lego-piano/tree/ You may have noticed that at least one of those pages does not show links for the sub-modules. If I disable the cache (``cache-size=0``), all pages show all configured module-links, reliably. If I enable the cache (``cache-size=1000``, no other cache-related setting in the ``/etc/cgitrc`` file), then the *first* page I access shows the correct links (if it has any), but subsequent ones don't. This is cgit 1.2.3 with a one-line patch to compare sub-module names case-insensitively (``ret->submodules.cmp = strcasecmp`` inside ``cgit_add_repo``) which I'm pretty sure shouldn't create the problem I'm seeing. One thing I've noticed is that cgit caches all repositories' configuration in a single file, and that file does not include any ``module-link`` line. If cgit reads the configuration directly in the absence of this single file, but reads only this file if it's present, that would explain the observed behaviour. Does the code that serialises the configuration to the cache need to be taught about ``module-link`` (and maybe other settings)? Thanks! -- Dakkar - GPG public key fingerprint = A071 E618 DD2C 5901 9574 6FE2 40EA 9883 7519 3F88 key id = 0x75193F88