From: "Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com> To: git@vger.kernel.org Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, "Philip Oakley" <philipoakley@iee.email>, "Eric Sunshine" <sunshine@sunshineco.com>, "SZEDER Gábor" <szeder.dev@gmail.com>, "Philippe Blain" <levraiphilippeblain@gmail.com>, "Philippe Blain" <levraiphilippeblain@gmail.com> Subject: [PATCH v3 4/4] git.txt: add list of guides Date: Wed, 05 Aug 2020 01:19:07 +0000 [thread overview] Message-ID: <840371fb4b7ec5ae5c5876be25f27008359dab9e.1596590347.git.gitgitgadget@gmail.com> (raw) In-Reply-To: <pull.691.v3.git.1596590347.gitgitgadget@gmail.com> From: Philippe Blain <levraiphilippeblain@gmail.com> Not all man5/man7 guides are mentioned in the 'git(1)' documentation, which makes the missing ones somewhat hard to find. Add a list of the guides to git(1) by leveraging the existing `Documentation/cmd-list.perl` script to generate a file `cmds-guide.txt` which gets included in git.txt. Also, do not hard-code the manual section '1'. Instead, use a regex so that the manual section is discovered from the first line of each `git*.txt` file. This addition was hinted at in 1b81d8cb19 (help: use command-list.txt for the source of guides, 2018-05-20). Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> --- Documentation/Makefile | 1 + Documentation/cmd-list.perl | 7 ++++++- Documentation/git.txt | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index eb9c7e2b0e..80d1908a44 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -295,6 +295,7 @@ cmds_txt = cmds-ancillaryinterrogators.txt \ cmds-plumbingmanipulators.txt \ cmds-synchingrepositories.txt \ cmds-synchelpers.txt \ + cmds-guide.txt \ cmds-purehelpers.txt \ cmds-foreignscminterface.txt diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl index ee96de53db..af5da45d28 100755 --- a/Documentation/cmd-list.perl +++ b/Documentation/cmd-list.perl @@ -6,9 +6,14 @@ sub format_one { my ($out, $nameattr) = @_; my ($name, $attr) = @$nameattr; my ($state, $description); + my $mansection; $state = 0; open I, '<', "$name.txt" or die "No such file $name.txt"; while (<I>) { + if (/^git[a-z0-9-]*\(([0-9])\)$/) { + $mansection = $1; + next; + } if (/^NAME$/) { $state = 1; next; @@ -27,7 +32,7 @@ sub format_one { die "No description found in $name.txt"; } if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) { - print $out "linkgit:$name\[1\]::\n\t"; + print $out "linkgit:$name\[$mansection\]::\n\t"; if ($attr =~ / deprecated /) { print $out "(deprecated) "; } diff --git a/Documentation/git.txt b/Documentation/git.txt index 3e50065198..81349a84e7 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -304,6 +304,13 @@ users typically do not use them directly. include::cmds-purehelpers.txt[] +Guides +------ + +The following documentation pages are guides about Git concepts. + +include::cmds-guide.txt[] + Configuration Mechanism ----------------------- -- gitgitgadget
prev parent reply other threads:[~2020-08-05 1:20 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-02 15:20 [PATCH 0/3] [RFC] List all guides in git(1) Philippe Blain via GitGitGadget 2020-08-02 15:20 ` [PATCH 1/3] command-list.txt: add missing 'gitcredentials' and 'gitremote-helpers' Philippe Blain via GitGitGadget 2020-08-02 15:20 ` [PATCH 2/3] help: drop usage of 'common' and 'useful' for guides Philippe Blain via GitGitGadget 2020-08-02 15:20 ` [PATCH 3/3] git.txt: add list of guides Philippe Blain via GitGitGadget 2020-08-02 21:44 ` Junio C Hamano 2020-08-02 22:05 ` Junio C Hamano 2020-08-03 14:16 ` Philippe Blain 2020-08-04 0:20 ` [PATCH v2 0/3] List all guides in git(1) Philippe Blain via GitGitGadget 2020-08-04 0:20 ` [PATCH v2 1/3] command-list.txt: add missing 'gitcredentials' and 'gitremote-helpers' Philippe Blain via GitGitGadget 2020-08-04 0:20 ` [PATCH v2 2/3] help: drop usage of 'common' and 'useful' for guides Philippe Blain via GitGitGadget 2020-08-04 0:20 ` [PATCH v2 3/3] git.txt: add list of guides Philippe Blain via GitGitGadget 2020-08-04 0:26 ` [PATCH v2 0/3] List all guides in git(1) Junio C Hamano 2020-08-04 13:44 ` Philippe Blain 2020-08-05 1:19 ` [PATCH v3 0/4] " Philippe Blain via GitGitGadget 2020-08-05 1:19 ` [PATCH v3 1/4] command-list.txt: add missing 'gitcredentials' and 'gitremote-helpers' Philippe Blain via GitGitGadget 2020-08-05 1:19 ` [PATCH v3 2/4] help: drop usage of 'common' and 'useful' for guides Philippe Blain via GitGitGadget 2020-08-05 1:19 ` [PATCH v3 3/4] Documentation: don't hardcode command categories twice Junio C Hamano via GitGitGadget 2020-08-05 1:19 ` Philippe Blain via GitGitGadget [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=840371fb4b7ec5ae5c5876be25f27008359dab9e.1596590347.git.gitgitgadget@gmail.com \ --to=gitgitgadget@gmail.com \ --cc=git@vger.kernel.org \ --cc=levraiphilippeblain@gmail.com \ --cc=pclouds@gmail.com \ --cc=philipoakley@iee.email \ --cc=sunshine@sunshineco.com \ --cc=szeder.dev@gmail.com \ --subject='Re: [PATCH v3 4/4] git.txt: add list of guides' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://80x24.org/mirrors/git.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).