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

Re: [PATCH 1/3] command-list.txt: group common commands by theme

From
Eric Sunshine <sunshine@sunshineco.com>
Date
May 6, 2015, 06:57 UTC
Message-ID
<CAPig+cTHQikgOvPrjxikUNjQoWCv2hdubJ55OG0SqpGUs_3Pow@mail.gmail.com>
In-Reply-To
<b89d3fec640cb6fb01aa32ad50bae4e064528220.1430770308.git.sebastien.guimmara@gmail.com>

On Mon, May 4, 2015 at 4:28 PM, Sébastien Guimmara <sebastien.guimmara@gmail.com> wrote:

Show 22 quoted lines
> Declare groups for common commands in the [groups] block,
> followed by group names and descriptions:
>
>    [groups]
>    init                   starting a working area
>    worktree               working on the current change
>    remote                 working with others
>    info                   examining the history and state
>    history                growing, marking and tweaking your history
>
> Then, in the [commands] block, map all common commands with a group:
>
>    [commands]
>    git-add        mainporcelain     common-worktree
>    git-branch     mainporcelain     common-history
>    git-checkout   mainporcelain     common-history
>    [...]
>
> command names and groups are then parsed with generate-cmdlist.sh to
> generate common-commands.h.
>
> Those commands are displayed in groups in the output of 'git help'.

It probably also is important to mention that the order of the items in [groups] is the order in which groups are output by 'git help'

More below.
Show 11 quoted lines
> Signed-off-by: Sébastien Guimmara <sebastien.guimmara@gmail.com>
> ---
> diff --git a/command-list.txt b/command-list.txt
> index f1eae08..64394ca 100644
> --- a/command-list.txt
> +++ b/command-list.txt
> @@ -1,29 +1,39 @@
>  # List of known git commands.
> -# command name                         category [deprecated] [common]
> -git-add                                 mainporcelain common
> +# only add group information for common commands

Perhaps mention also that the order of groups here is the order in which they are output by 'git help'?

> +[groups]

Thinking on this a bit more, perhaps [groups] is too generic. Maybe [common] or [commongroups] would be more descriptive?

> +init                   starting a working area
> +worktree               working on the current change
> +remote                 working with others
"collaborating with others" perhaps?
More below.
Show 30 quoted lines
> +info                   examining the history and state
> +history                growing, marking and tweaking your history
> +
> +# command name         [deprecated]     category                     [group]
> +[commands]
> +git-add                                 mainporcelain                common-worktree
>  [...]
> -git-bisect                              mainporcelain common
> +git-bisect                              mainporcelain
>  [...]
> -git-branch                              mainporcelain common
> +git-branch                              mainporcelain                common-history
>  [...]
> -git-checkout                            mainporcelain common
> +git-checkout                            mainporcelain                common-history
>  [...]
> -git-clone                               mainporcelain common
> +git-clone                               mainporcelain                common-init
>  [...]
> -git-commit                              mainporcelain common
> +git-commit                              mainporcelain                common-history
>  [...]
> -git-diff                                mainporcelain common
> +git-diff                                mainporcelain                common-history
>  [...]
> -git-fast-export                                ancillarymanipulators
> -git-fast-import                                ancillarymanipulators
> -git-fetch                               mainporcelain common
> +git-fast-export                         ancillarymanipulators
> +git-fast-import                         ancillarymanipulators

Unintended whitespace changes for fast-export and fast-import lines? I wouldn't have expected to see these lines change in this patch.

> +git-fetch                               mainporcelain                common-remote
>  [...]
> -git-fsck                               ancillaryinterrogators
> +git-fsck                                ancillaryinterrogators
Unintended whitespace change?
>  [...]
> -git-grep                                mainporcelain common
> +git-grep                                mainporcelain

This change isn't mentioned anywhere, not even in the cover letter. Did you intend to drop 'grep' from the common command list?

>  [...]
> -git-help                               ancillaryinterrogators
> +git-help                                ancillaryinterrogators
Whitespace change?
More below.
Show 35 quoted lines
>  [...]
> -git-init                                mainporcelain common
> +git-init                                mainporcelain                common-init
>  [...]
> -git-log                                 mainporcelain common
> +git-log                                 mainporcelain                common-info
>  [...]
> -git-merge                               mainporcelain common
> +git-merge                               mainporcelain                common-history
>  [...]
> -git-mv                                  mainporcelain common
> +git-mv                                  mainporcelain
>  [...]
> -git-pull                                mainporcelain common
> -git-push                                mainporcelain common
> +git-pull                                mainporcelain                common-remote
> +git-push                                mainporcelain                common-remote
>  [...]
> -git-rebase                              mainporcelain common
> +git-rebase                              mainporcelain
>  [...]
> -git-reset                               mainporcelain common
> +git-reset                               mainporcelain                common-worktree
>  [...]
> -git-rm                                  mainporcelain common
> +git-rm                                  mainporcelain
>  [...]
> -git-show                                mainporcelain common
> +git-show                                mainporcelain
>  [...]
> -git-status                              mainporcelain common
> +git-status                              mainporcelain                common-info
>  [...]
> -git-tag                                 mainporcelain common
> +git-tag                                 mainporcelain
This change also is not mentioned anywhere.
>  [...]
> -git-write-tree                          plumbingmanipulators
> +git-write-tree                          plumbingmanipulators
> \ No newline at end of file

Your editor is perhaps dropping the final newline in the file? This is an undesirable change. Patch 2/3 exhibits the same problem.

> --
> 2.4.0
Previous: Sébastien GuimmaraNext: Sébastien Guimmara
Message 3 of 38 in “git help: group common commands by theme”
  1. 0/3 git help: group common commands by themeSébastien Guimmara, May 4, 2015
  2. 1/3 command-list.txt: group common commands by themeSébastien Guimmara, May 4, 2015
  3. Eric SunshineMay 6, 2015
  4. Sébastien GuimmaraMay 6, 2015
  5. Eric SunshineMay 7, 2015
  6. Johannes SixtMay 7, 2015
  7. Johannes SchindelinMay 8, 2015
  8. Andreas SchwabMay 8, 2015
  9. Johannes SchindelinMay 8, 2015
  10. Sébastien GuimmaraMay 8, 2015
  11. Eric SunshineMay 8, 2015
  12. 2/3 generate-cmdlist.sh: parse common group commandsSébastien Guimmara, May 4, 2015
  13. Eric SunshineMay 8, 2015
  14. Eric SunshineMay 8, 2015
  15. Sébastien GuimmaraMay 8, 2015
  16. 3/3 git help: group common commands by themeSébastien Guimmara, May 4, 2015
  17. Eric SunshineMay 6, 2015
  18. Sébastien GuimmaraMay 6, 2015
  19. Sébastien GuimmaraMay 8, 2015
  20. Stefan BellerMay 8, 2015
  21. Eric SunshineMay 8, 2015
  22. Sébastien GuimmaraMay 8, 2015
  23. Eric SunshineMay 6, 2015
  24. Sébastien GuimmaraMay 6, 2015
  25. Eric SunshineMay 6, 2015
  26. Junio C HamanoMay 6, 2015
  27. Sébastien GuimmaraMay 8, 2015
  28. Junio C HamanoMay 8, 2015
  29. Matthieu MoyMay 6, 2015
  30. Junio C HamanoMay 6, 2015
  31. Matthieu MoyMay 7, 2015
  32. Junio C HamanoMay 7, 2015
  33. Matthieu MoyMay 8, 2015
  34. Junio C HamanoMay 8, 2015
  35. Emma Jane Hogbin WestbyMay 7, 2015
  36. Sébastien GuimmaraMay 8, 2015
  37. Junio C HamanoMay 8, 2015
  38. Sébastien GuimmaraMay 8, 2015

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.