List for cgit developers and users
 help / color / mirror / Atom feed
From: Gianni Ceccarelli <dakkar@thenautilus.net>
To: cgit@lists.zx2c4.com
Subject: Re: Weird interactions betwen cache and module-link
Date: Sat, 26 Mar 2022 10:44:12 +0000	[thread overview]
Message-ID: <20220326104412.22146718@nautilus> (raw)
In-Reply-To: <Yj7rUSsNZ2XsDTqx@keeping.me.uk>

[-- Attachment #1: Type: text/plain, Size: 365 bytes --]

On 2022-03-26 John Keeping <john@keeping.me.uk> wrote:
> Would you like to type up a proper patch with a commit message and
> Signed-off-by certification?

Sure! Patch attached.

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


[-- Attachment #2: 0001-cgit.c-teach-repo-config-printing-about-per-path-mod.patch --]
[-- Type: text/x-patch, Size: 1049 bytes --]

From 9c8f12809a7727b19a111d717b27143c4e2001bd Mon Sep 17 00:00:00 2001
From: dakkar <dakkar@thenautilus.net>
Date: Sat, 26 Mar 2022 10:39:45 +0000
Subject: [PATCH] cgit.c: teach repo config printing about per-path module-link

This prevented path-specific module-links from working when cache was
enabled, since the cache repo config didn't include them.

Signed-off-by: Gianni Ceccarelli <dakkar@thenautilus.net>
---
 cgit.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cgit.c b/cgit.c
index 08d81a1..ae3a66e 100644
--- a/cgit.c
+++ b/cgit.c
@@ -810,6 +810,10 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
 		fprintf(f, "repo.extra-head-content=%s\n", repo->extra_head_content);
 	if (repo->module_link)
 		fprintf(f, "repo.module-link=%s\n", repo->module_link);
+	for_each_string_list_item(item, &repo->submodules) {
+		if (item->util)
+			fprintf(f, "repo.module-link.%s=%s\n", item->string, (char*)item->util);
+	}
 	if (repo->section)
 		fprintf(f, "repo.section=%s\n", repo->section);
 	if (repo->homepage)
-- 
2.34.1


      reply	other threads:[~2022-03-26 10:44 UTC|newest]

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

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=20220326104412.22146718@nautilus \
    --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).