Thread View: linux.kernel.git
5 messages
5 total messages
Started by Tuomas Ahola
Thu, 26 Nov 2026 20:11
[PATCH v4 0/2] guides: keep Documentation/Makefile and command-list.txt in sync
Author: Tuomas Ahola
Date: Thu, 26 Nov 2026 20:11
Date: Thu, 26 Nov 2026 20:11
141 lines
14729 bytes
14729 bytes
A new linter test has been added to Documentation/lint-manpages.sh
to ensure that all non-command manual pages (concept guides and
interface manuals) listed in Documentation/Makefile are present in
command-list.txt.
Changes in v4:
* [1/2]: Rebased to 0ffa3e35c7 (The 15th batch, 2026-11-04)
* [2/2]: Changed the signature of extract_variable()
to extract_variable <Makefile> <variable>...
Changes in v3:
* [2/2]:
- Exempt obsoleted gittutorial-2(7).
- Even more defensive quotation.
Changes in v2:
* [1/2]: Use command-list.txt as the area identifier.
* [2/2]: Protect variables against whitespace breakage per review comment.
synthetic-base: master + je/doc-remove-gittutorial-2
Tuomas Ahola (2):
command-list.txt: add gitformat-loose(5) and gitpacking(7)
lint-docs: ensure command-list.txt lists all guides
Documentation/lint-manpages.sh | 29 +++++++++++++++++++----------
command-list.txt | 2 ++
2 files changed, 21 insertions(+), 10 deletions(-)
Intervall-diff mot v3:
1: 9a1ba61ac0 ! 1: a21c0e2bf7 command-list.txt: add gitformat-loose(5) and gitpacking(7)
@@ command-list.txt: gitformat-bundle developerinterfaces
gitformat-pack developerinterfaces
gitformat-signature developerinterfaces
gitglossary guide
-@@ command-list.txt: gitk mainporcelain
- gitmailmap userinterfaces
+@@ command-list.txt: gitmailmap userinterfaces
+ gitmergeconflicts guide
gitmodules userinterfaces
gitnamespaces guide
+gitpacking guide
2: 5d36d75859 ! 2: 4e41401866 lint-docs: check the guide list in command-list.txt
@@ Metadata
Author: Tuomas Ahola <taahol@utu.fi>
## Commit message ##
- lint-docs: check the guide list in command-list.txt
+ lint-docs: ensure command-list.txt lists all guides
Since 2135e1ad70 (command-list.txt: add missing 'gitcredentials' and
'gitremote-helpers', 2020-08-05) there has been a comment in
@@ Commit message
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
+ MAN5_TXT and MAN7_TXT from the docs Makefile and check command-list.txt
against them. Exempt gitweb.conf(5) and gittutorial-2(7) from the
- new linter routine.
+ new linter routine as deliberate omissions.
Signed-off-by: Tuomas Ahola <taahol@utu.fi>
- ## Documentation/Makefile ##
-@@ Documentation/Makefile: 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)
-
## Documentation/lint-manpages.sh ##
@@
#!/bin/sh
extract_variable () {
-+ file="${2:-../Makefile}"
-+ directory="$(dirname "$file")"
- (
+- (
- cat ../Makefile
-+ cat "$file"
- cat <<EOF
+- cat <<EOF
++ file="$1"
++ directory="$(dirname "$file")"
++ shift
++ for i in "$@"
++ do
++ (
++ 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 "$directory" -f - print_variable 2>/dev/null |
- sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p'
+- sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p'
++ ) |
++ make -C "$directory" -f - print_variable 2>/dev/null |
++ sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p'
++ done
}
check_missing_docs () (
@@ Documentation/lint-manpages.sh: check_missing_docs () (
if ! test -f "$v.adoc"
@@ Documentation/lint-manpages.sh: 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)"
+ )
+ }
+
+-BUILT_INS="$(extract_variable BUILT_INS)"
+-ALL_COMMANDS="$(extract_variable ALL_COMMANDS)"
+-EXCLUDED_PROGRAMS="$(extract_variable EXCLUDED_PROGRAMS)"
++BUILT_INS="$(extract_variable ../Makefile BUILT_INS)"
++ALL_COMMANDS="$(extract_variable ../Makefile ALL_COMMANDS)"
++EXCLUDED_PROGRAMS="$(extract_variable ../Makefile EXCLUDED_PROGRAMS)"
++MAN_GUIDES="$(extract_variable Makefile MAN5_TXT MAN7_TXT | sed -e 's/\.adoc//')"
findings=$(
if ! check_missing_docs
base-commit: 0ffa3e35c7c82ab8d0de226149fb03b3f7674d05
--
ta/command-list-guides-sync-lint
[PATCH v4 1/2] command-list.txt: add gitformat-loose(5) and gitpacking(7)
Author: Tuomas Ahola
Date: Thu, 26 Nov 2026 20:11
Date: Thu, 26 Nov 2026 20:11
39 lines
11195 bytes
11195 bytes
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 <taahol@utu.fi> --- command-list.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command-list.txt b/command-list.txt index 56d0d7ed9b..6936ae8409 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 @@ -235,6 +236,7 @@ gitmailmap userinterfaces gitmergeconflicts guide gitmodules userinterfaces gitnamespaces guide +gitpacking guide gitprotocol-capabilities developerinterfaces gitprotocol-common developerinterfaces gitprotocol-http developerinterfaces -- ta/command-list-guides-sync-lint
Re: [PATCH v4 1/2] command-list.txt: add gitformat-loose(5) and gitpacking(7)
Author: Junio C Hamano
Date: Fri, 27 Nov 2026 14:17
Date: Fri, 27 Nov 2026 14:17
72 lines
15702 bytes
15702 bytes
Tuomas Ahola <taahol@utu.fi> writes: > Three manpages from sections 5 and 7 are not featured in > command-list.txt as concept guides or interface manuals. Since this series is now based after the removal of gittutorial-2(7) from command-list.txt while its stub remains in MAN7_TXT in Documentation/Makefile, there are actually four section 5 and 7 manpages missing from command-list.txt (gitformat-loose(5), gitpacking(7), gitweb.conf(5), and the obsolete gittutorial-2(7) stub). Updating the count and mentioning gittutorial-2(7) alongside gitweb.conf(5) here would keep the log consistent with patch 2/2. > 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. The above matches help.c:drop_prefix(), which strips the "git" prefix for CAT_userinterfaces (unlike commands, where it strips "git-"). "gitweb.conf" would indeed show up as "web.conf" in both "git help -a" and "git help --user-interfaces". Leaving it out is a sensible workaround, at least for now. By the way, plain single quotes 'git help -a' instead of backticks are preferred in the commit messages. Nobody passes these proposed log messages through AsciiDoc or Markdown processors, and they are supposed to be pure text. > Signed-off-by: Tuomas Ahola <taahol@utu.fi> > --- > command-list.txt | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/command-list.txt b/command-list.txt > index 56d0d7ed9b..6936ae8409 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 > @@ -235,6 +236,7 @@ gitmailmap userinterfaces > gitmergeconflicts guide > gitmodules userinterfaces > gitnamespaces guide > +gitpacking guide > gitprotocol-capabilities developerinterfaces > gitprotocol-common developerinterfaces > gitprotocol-http developerinterfaces Both entries are placed in the right alphabetical spots and match the existing categories Their NAME lines in Documentation/gitformat-loose.adoc and Documentation/gitpacking.adoc already match the expected "<name> - <Capitalized description>" format consumed by tools/generate-cmdlist.sh and Documentation/cmd-list.sh. Aside from refreshing the commit message for gittutorial-2(7), this step looks good. Thanks.
Re: [PATCH v4 1/2] command-list.txt: add gitformat-loose(5) and gitpacking(7)
Author: "Kristoffer Haugsbakk"
Date: Fri, 27 Nov 2026 21:02
Date: Fri, 27 Nov 2026 21:02
26 lines
13749 bytes
13749 bytes
On Fri, Nov 27, 2026, at 15:17, Junio C Hamano wrote: > Tuomas Ahola <taahol@utu.fi> writes: >>[snip] >> 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. > >[snip] > > By the way, plain single quotes 'git help -a' instead of backticks are > preferred in the commit messages. Nobody passes these proposed log > messages through AsciiDoc or Markdown processors, and they are supposed > to be pure text. I use backticks in commit messags for my own personal work just because I prefer the look. So itβs not for some markup language. And in that sense using `, ', or " are all equally pseudo-markup. The only time I actively dislike no quoting at all is when the code part is a simple and commonplace word and the context makes the sentence read weird enough for me to do a double take. >[snip]
Re: [PATCH v4 1/2] command-list.txt: add gitformat-loose(5) and gitpacking(7)
Author: Junio C Hamano
Date: Fri, 27 Nov 2026 22:14
Date: Fri, 27 Nov 2026 22:14
14 lines
13162 bytes
13162 bytes
"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes: >> By the way, plain single quotes 'git help -a' instead of backticks are >> preferred in the commit messages. Nobody passes these proposed log >> messages through AsciiDoc or Markdown processors, and they are supposed >> to be pure text. > > I use backticks in commit messags for my own personal work just because Surely you may have your own reason to use whategver in your personal work. I won't try to dictate what you would use there ;-) Thanks.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads