summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-09-10 08:33:25 -0700
committerJunio C Hamano <gitster@pobox.com>2026-09-10 08:33:26 -0700
commit95209831084a15e0fd64678bf07e20f9d1f9f3cc (patch)
tree06e13a8ad4e2687dfb47d67b3a0f6b44ff41675e
parent25d066a1aefc6d0072276a08e61227a1ad2227f5 (diff)
parent8d96b6031c6c2b175d3679bdd67ac5cb8244bfe9 (diff)
Merge branch 'ta/command-list-guides-sync-lint' into jchjch
A new linter test has been added to Documentation/lint-manpages.sh to ensure that all non-command manual pages (guides and developer interfaces) listed in Documentation/Makefile are present in command-list.txt, replacing an older comment that reminded developers to keep them in sync. * ta/command-list-guides-sync-lint: lint-docs: check the guide list in command-list.txt command-list: add gitformat-loose(5) and gitpacking(7)
-rw-r--r--Documentation/Makefile2
-rwxr-xr-xDocumentation/lint-manpages.sh9
-rw-r--r--command-list.txt2
3 files changed, 10 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..290ebe0947 100755
--- a/Documentation/lint-manpages.sh
+++ b/Documentation/lint-manpages.sh
@@ -1,21 +1,22 @@
#!/bin/sh
extract_variable () {
+ file=${2:-../Makefile}
(
- cat ../Makefile
+ cat $file
cat <<EOF
print_variable:
@\$(foreach b,\$($1),echo XXX \$(b:\$X=) YYY;)
EOF
) |
- make -C .. -f - print_variable 2>/dev/null |
+ make -C $(dirname $file) -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 +30,7 @@ check_missing_docs () (
git-stage) continue;;
git-legacy-*) continue;;
git-?*--?* ) continue ;;
+ gitweb.conf) continue ;;
esac
if ! test -f "$v.adoc"
@@ -87,6 +89,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
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