Weird interactions betwen cache and module-link
Gianni Ceccarelli
dakkar at thenautilus.net
Fri Mar 25 21:08:16 UTC 2022
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
More information about the CGit
mailing list