List for cgit developers and users
 help / color / mirror / Atom feed
From: Gianni Ceccarelli <dakkar@thenautilus.net>
To: cgit@lists.zx2c4.com
Subject: Weird interactions betwen cache and module-link
Date: Fri, 25 Mar 2022 21:08:16 +0000	[thread overview]
Message-ID: <20220325210816.6f89abb3@thenautilus.net> (raw)

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 - <Mobilis in mobile>
	GPG public key fingerprint = A071 E618 DD2C 5901 9574
	                             6FE2 40EA 9883 7519 3F88
	                    key id = 0x75193F88


             reply	other threads:[~2022-03-25 21:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 21:08 Gianni Ceccarelli [this message]
2022-03-25 21:44 ` Gianni Ceccarelli
2022-03-26 10:30   ` John Keeping
2022-03-26 10:44     ` Gianni Ceccarelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220325210816.6f89abb3@thenautilus.net \
    --to=dakkar@thenautilus.net \
    --cc=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).