git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/5] doc lint: lint and fix missing "GIT" end sections

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 28, 2021, 06:42 UTC
Message-ID
<xmqqr1jzn5j5.fsf@gitster.g>
In-Reply-To
<patch-5.6-d4004b6a7cb-20210326T103454Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 6 quoted lines
> Lint for and fix the three manual pages that were missing the standard
> "Part of the linkgit:git[1] suite" end section.
>
> We only do this for the man[157] section documents (we don't have
> anything outside those sections), not files to be included,
> howto *.txt files etc.

OK. Alternatively we could drop the footer from all pages. IIRC, we used to have another footer section to credit primary authors, which we dropped years ago. I doubt "git-foo is part of git suite" is something worth repeating over and over.

Thanks.
Show 89 quoted lines
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  Documentation/Makefile           |  2 ++
>  Documentation/git-credential.txt |  4 ++++
>  Documentation/git-p4.txt         |  4 ++++
>  Documentation/gitnamespaces.txt  |  4 ++++
>  Documentation/lint-man-txt.perl  | 24 ++++++++++++++++++++++++
>  5 files changed, 38 insertions(+)
>  create mode 100755 Documentation/lint-man-txt.perl
>
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index 6bfd8c75772..2b6cd0f7be2 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -490,6 +490,8 @@ lint-docs::
>  		--section=5 $(MAN5_TXT) \
>  		--section=7 $(MAN7_TXT)	\
>  		--to-lint $(ALL_TXT)
> +	$(QUIET_LINT)$(PERL_PATH) lint-man-txt.perl \
> +		$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
>  
>  ifeq ($(wildcard po/Makefile),po/Makefile)
>  doc-l10n install-l10n::
> diff --git a/Documentation/git-credential.txt b/Documentation/git-credential.txt
> index 31c81c4c026..206e3c5f407 100644
> --- a/Documentation/git-credential.txt
> +++ b/Documentation/git-credential.txt
> @@ -159,3 +159,7 @@ empty string.
>  +
>  Components which are missing from the URL (e.g., there is no
>  username in the example above) will be left unset.
> +
> +GIT
> +---
> +Part of the linkgit:git[1] suite
> diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
> index f89e68b424c..38e5257b2a4 100644
> --- a/Documentation/git-p4.txt
> +++ b/Documentation/git-p4.txt
> @@ -762,3 +762,7 @@ IMPLEMENTATION DETAILS
>    message indicating the p4 depot location and change number.  This
>    line is used by later 'git p4 sync' operations to know which p4
>    changes are new.
> +
> +GIT
> +---
> +Part of the linkgit:git[1] suite
> diff --git a/Documentation/gitnamespaces.txt b/Documentation/gitnamespaces.txt
> index b614969ad2c..1c8d2ecc358 100644
> --- a/Documentation/gitnamespaces.txt
> +++ b/Documentation/gitnamespaces.txt
> @@ -62,3 +62,7 @@ git clone ext::'git --namespace=foo %s /tmp/prefixed.git'
>  ----------
>  
>  include::transfer-data-leaks.txt[]
> +
> +GIT
> +---
> +Part of the linkgit:git[1] suite
> diff --git a/Documentation/lint-man-txt.perl b/Documentation/lint-man-txt.perl
> new file mode 100755
> index 00000000000..d69312e5db5
> --- /dev/null
> +++ b/Documentation/lint-man-txt.perl
> @@ -0,0 +1,24 @@
> +#!/usr/bin/perl
> +
> +use strict;
> +use warnings;
> +
> +my $exit_code = 0;
> +sub report {
> +	my ($target, $msg) = @_;
> +	print "error: $target: $msg\n";
> +	$exit_code = 1;
> +}
> +
> +local $/;
> +while (my $slurp = <>) {
> +	report($ARGV, "has no 'Part of the linkgit:git[1] suite' end blurb")
> +		unless $slurp =~ m[
> +		^GIT\n
> +		 ---\n
> +		\QPart of the linkgit:git[1] suite\E \n
> +		\z
> +	]mx;
> +}
> +
> +exit $exit_code;
Previous: Jeff KingNext: Junio C Hamano
Message 12 of 32 in “small doc make and lint fixes”
  1. 0/5 small doc make and lint fixesÆvar Arnfjörð Bjarmason, Mar 26, 2021
  2. 1/5 Documentation/Makefile: make $(wildcard howto/*.txt) a varÆvar Arnfjörð Bjarmason, Mar 26, 2021
  3. Junio C HamanoMar 28, 2021
  4. 3/5 doc lint: Perl "strict" and "warnings" in lint-gitlink.perlÆvar Arnfjörð Bjarmason, Mar 26, 2021
  5. Junio C HamanoMar 28, 2021
  6. 2/5 Documentation/Makefile: make $(wildcard <doc deps>) a varÆvar Arnfjörð Bjarmason, Mar 26, 2021
  7. Junio C HamanoMar 28, 2021
  8. 5/5 doc lint: lint and fix missing "GIT" end sectionsÆvar Arnfjörð Bjarmason, Mar 26, 2021
  9. Jeff KingMar 26, 2021
  10. Ævar Arnfjörð BjarmasonMar 26, 2021
  11. Jeff KingMar 27, 2021
  12. Junio C HamanoMar 28, 2021
  13. Junio C HamanoMar 28, 2021
  14. Ævar Arnfjörð BjarmasonApr 9, 2021
  15. Junio C HamanoApr 10, 2021
  16. 4/5 doc lint: fix bugs in, simplify and improve lint scriptÆvar Arnfjörð Bjarmason, Mar 26, 2021
  17. Jeff KingMar 26, 2021
  18. Junio C HamanoMar 28, 2021
  19. Philip OakleyMar 26, 2021
  20. Junio C HamanoMar 28, 2021
  21. Junio C HamanoMar 28, 2021
  22. Jeff KingMar 26, 2021
  23. Ævar Arnfjörð BjarmasonMar 26, 2021
  24. Jeff KingMar 27, 2021
  25. 0/7 doc make and lint fixesÆvar Arnfjörð Bjarmason, Apr 9, 2021
  26. 1/7 Documentation/Makefile: make $(wildcard howto/*.txt) a varÆvar Arnfjörð Bjarmason, Apr 9, 2021
  27. 3/7 doc lint: Perl "strict" and "warnings" in lint-gitlink.perlÆvar Arnfjörð Bjarmason, Apr 9, 2021
  28. 2/7 Documentation/Makefile: make doc.dep dependencies a variable againÆvar Arnfjörð Bjarmason, Apr 9, 2021
  29. 4/7 doc lint: fix bugs in, simplify and improve lint scriptÆvar Arnfjörð Bjarmason, Apr 9, 2021
  30. 6/7 doc lint: lint relative section orderÆvar Arnfjörð Bjarmason, Apr 9, 2021
  31. 5/7 doc lint: lint and fix missing "GIT" end sectionsÆvar Arnfjörð Bjarmason, Apr 9, 2021
  32. 7/7 docs: fix linting issues due to incorrect relative section orderÆvar Arnfjörð Bjarmason, Apr 9, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.