List for cgit developers and users
 help / color / mirror / Atom feed
* Weird interactions betwen cache and module-link
@ 2022-03-25 21:08 Gianni Ceccarelli
  2022-03-25 21:44 ` Gianni Ceccarelli
  0 siblings, 1 reply; 4+ messages in thread
From: Gianni Ceccarelli @ 2022-03-25 21:08 UTC (permalink / raw)
  To: 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 - <Mobilis in mobile>
	GPG public key fingerprint = A071 E618 DD2C 5901 9574
	                             6FE2 40EA 9883 7519 3F88
	                    key id = 0x75193F88


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-26 10:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-25 21:08 Weird interactions betwen cache and module-link Gianni Ceccarelli
2022-03-25 21:44 ` Gianni Ceccarelli
2022-03-26 10:30   ` John Keeping
2022-03-26 10:44     ` Gianni Ceccarelli

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).