From 31ab70944f03cc08f5be8b083d0f4bfda9b36cb8 Mon Sep 17 00:00:00 2001 From: Tuomas Ahola Date: Thu, 10 Sep 2026 22:43:50 +0300 Subject: [PATCH 1/2] command-list.txt: add gitformat-loose(5) and gitpacking(7) Three manpages from sections 5 and 7 are not featured in command-list.txt as concept guides or interface manuals. As easy fixes, add gitformat-loose(5) to 'developerinterfaces' and make gitpacking(7) a 'guide'. That leaves only gitweb.conf(5) which could be added to 'userinterfaces'. However, the manual would then appear as "web.conf" in `git help -a` which is just confusing. So, perhaps we are better off by leaving it out. Signed-off-by: Tuomas Ahola Signed-off-by: Junio C Hamano --- command-list.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command-list.txt b/command-list.txt index 63ae2a67c9..955eec6e7e 100644 --- a/command-list.txt +++ b/command-list.txt @@ -225,6 +225,7 @@ gitformat-bundle developerinterfaces gitformat-chunk developerinterfaces gitformat-commit-graph developerinterfaces gitformat-index developerinterfaces +gitformat-loose developerinterfaces gitformat-pack developerinterfaces gitformat-signature developerinterfaces gitglossary guide @@ -234,6 +235,7 @@ gitk mainporcelain gitmailmap userinterfaces gitmodules userinterfaces gitnamespaces guide +gitpacking guide gitprotocol-capabilities developerinterfaces gitprotocol-common developerinterfaces gitprotocol-http developerinterfaces From 4ce144a152830ab4ad6598129cfed21b8cf4a3a4 Mon Sep 17 00:00:00 2001 From: Tuomas Ahola Date: Thu, 10 Sep 2026 22:43:51 +0300 Subject: [PATCH 2/2] lint-docs: check the guide list in command-list.txt Since 2135e1ad70 (command-list.txt: add missing 'gitcredentials' and 'gitremote-helpers', 2020-08-05) there has been a comment in Documentation/Makefile reminding developers to add new guides also to command-list.txt. However, there is no linter script to enforce that. Adapt Documentation/lint-manpages.sh to fill that role. Extract MAN5_TXT and MAN7_TXT from the Makefile and check command-list.txt against them. Exempt gitweb.conf(5) from the new linter routine. Signed-off-by: Tuomas Ahola Signed-off-by: Junio C Hamano --- Documentation/Makefile | 2 ++ Documentation/lint-manpages.sh | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index f8dea4b395..8e28ac784b 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -67,6 +67,8 @@ MAN7_TXT += gittutorial-2.adoc MAN7_TXT += gittutorial.adoc MAN7_TXT += gitworkflows.adoc +MAN_GUIDES = $(patsubst %.adoc,%,$(MAN5_TXT) $(MAN7_TXT)) + HOWTO_TXT += $(wildcard howto/*.adoc) DOC_DEP_TXT += $(wildcard *.adoc) diff --git a/Documentation/lint-manpages.sh b/Documentation/lint-manpages.sh index a0ea572382..d4a1977ba6 100755 --- a/Documentation/lint-manpages.sh +++ b/Documentation/lint-manpages.sh @@ -1,21 +1,23 @@ #!/bin/sh extract_variable () { + file=${2:-../Makefile} + directory=$(dirname "$file") ( - cat ../Makefile + cat "$file" cat </dev/null | + make -C "$directory" -f - print_variable 2>/dev/null | sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p' } check_missing_docs () ( ret=0 - for v in $ALL_COMMANDS + for v in $ALL_COMMANDS $MAN_GUIDES do case "$v" in git-merge-octopus) continue;; @@ -29,6 +31,7 @@ check_missing_docs () ( git-stage) continue;; git-legacy-*) continue;; git-?*--?* ) continue ;; + gitweb.conf) continue ;; esac if ! test -f "$v.adoc" @@ -87,6 +90,7 @@ check_extraneous_docs () { BUILT_INS="$(extract_variable BUILT_INS)" ALL_COMMANDS="$(extract_variable ALL_COMMANDS)" EXCLUDED_PROGRAMS="$(extract_variable EXCLUDED_PROGRAMS)" +MAN_GUIDES="$(extract_variable MAN_GUIDES ./Makefile)" findings=$( if ! check_missing_docs