From 11c6659d85d72273a4161c8779123147b52fbcb2 Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Thu, 21 May 2015 19:39:18 +0200 Subject: command-list: prepare machinery for upcoming "common groups" section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ultimate goal is for "git help" to classify common commands by group. Toward this end, a subsequent patch will add a new "common groups" section to command-list.txt preceding the actual command list. As preparation, teach existing command-list.txt parsing machinery, which doesn't care about grouping, to skip over this upcoming "common groups" section. Signed-off-by: Eric Sunshine Signed-off-by: Sébastien Guimmara Reviewed-by: Eric Sunshine Signed-off-by: Junio C Hamano --- Documentation/cmd-list.perl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Documentation') diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl index 04f99778d..5aa73cfe4 100755 --- a/Documentation/cmd-list.perl +++ b/Documentation/cmd-list.perl @@ -38,6 +38,10 @@ sub format_one { } } +while (<>) { + last if /^### command list/; +} + my %cmds = (); for (sort <>) { next if /^#/; -- cgit v1.2.1 From 413f50b901f5f5addd7404516cdd3e8ee8a4ac25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Guimmara?= Date: Thu, 21 May 2015 19:39:19 +0200 Subject: command-list.txt: add the common groups block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ultimate goal is for "git help" to display common commands in groups rather than alphabetically. As a first step, define the groups in a new block, and then assign a group to each common command. Add a block at the beginning of command-list.txt: init start a working area (see also: git help tutorial) worktree work on the current change (see also:[...] info examine the history and state (see also: git [...] history grow, mark and tweak your history remote collaborate (see also: git help workflows) storing information about common commands group, then map each common command to a group: git-add mainporcelain common worktree Helped-by: Eric Sunshine Helped-by: Junio C Hamano Helped-by: Emma Jane Hogbin Westby Signed-off-by: Sébastien Guimmara Reviewed-by: Eric Sunshine Signed-off-by: Junio C Hamano --- Documentation/howto/new-command.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/howto/new-command.txt b/Documentation/howto/new-command.txt index d7de5a3e9..6d772bd92 100644 --- a/Documentation/howto/new-command.txt +++ b/Documentation/howto/new-command.txt @@ -95,7 +95,9 @@ your language, document it in the INSTALL file. that categorizes commands by type, so they can be listed in appropriate subsections in the documentation's summary command list. Add an entry for yours. To understand the categories, look at git-commands.txt -in the main directory. +in the main directory. If the new command is part of the typical Git +workflow and you believe it common enough to be mentioned in 'git help', +map this command to a common group in the column [common]. 7. Give the maintainer one paragraph to include in the RelNotes file to describe the new feature; a good place to do so is in the cover -- cgit v1.2.1