From e4263b952faba40be27f2f5118dc99bb962750d0 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Mon, 24 Aug 2026 16:11:31 -1000 Subject: Resolve submodule links from `.gitmodules` --- cgitrc.5.txt | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'cgitrc.5.txt') diff --git a/cgitrc.5.txt b/cgitrc.5.txt index ac33d6d..84dcdb6 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -194,6 +194,19 @@ enable-git-config:: with "cgit." will be mapped to the corresponding "repo." key in cgit. Default value: "0". See also: scan-path, section-from-path. +enable-gitmodules-links:: + Flag which, when set to "1", makes submodule listings derive a link + from the url recorded in the .gitmodules file at the shown revision, + for submodules that no module-link template covers. The url is first + matched, by its trailing path components, against the repositories + served by this cgit instance, so ssh, file and relative urls still + get a link when their target is hosted here, and the commit hash then + links to the target repository's commit page. Otherwise a plain http + or https url is linked as it is, an ssh url to a well-known public + host is rewritten to its https form, and any other url is left + unlinked and shown as a tooltip instead. Default value: "0". See + also: "repo.enable-gitmodules-links". + enable-http-clone:: If set to "1", cgit will act as a dumb HTTP endpoint for git clones. You can add "http://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL" to clone-url @@ -375,8 +388,8 @@ mimetype-file:: module-link:: Text which will be used as the formatstring for a hyperlink when a submodule is printed in a directory listing. The arguments for the - formatstring are the path and SHA1 of the submodule commit. Default - value: none. + formatstring are the name of the submodule directory and the SHA1 of + the submodule commit. Default value: none. noplainemail:: If set to "1" showing full author email addresses will be disabled. @@ -570,6 +583,10 @@ repo.enable-follow-links:: A flag which can be used to disable the global setting `enable-follow-links'. Default value: none. +repo.enable-gitmodules-links:: + A flag which can be used to override the global setting + `enable-gitmodules-links'. Default value: none. + repo.enable-html-serving:: A flag which can be used to override the global setting `enable-html-serving`. Default value: none. @@ -620,8 +637,8 @@ repo.logo-link:: repo.module-link:: Text which will be used as the formatstring for a hyperlink when a submodule is printed in a directory listing. The arguments for the - formatstring are the path and SHA1 of the submodule commit. Default - value: + formatstring are the name of the submodule directory and the SHA1 of + the submodule commit. Default value: repo.module-link.:: Text which will be used as the formatstring for a hyperlink when a -- cgit v2.8.0