Skip to content

Keep all info in command-list.txt in git binary

Nguyễn Thái Ngọc Duy git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12generate-cmds.sh: factor out synopsis extract codegenerate-cmdlist.sh+13 -72 replies
2/12generate-cmds.sh: export all commands to command-list.h.gitignore Makefile command-list.txt +1 more+75 -102 replies
3/12help: use command-list.h for common command listMakefile command-list.txt generate-cmdlist.sh +1 more+103 -500 replies
4/12Remove common-cmds.h.gitignore Makefile generate-cmdlist.sh+9 -550 replies
5/12git.c: convert --list-*builtins to --list-cmds=*contrib/completion/git-completion.bash git.c t/t0012-help.sh+9 -70 replies
6/12git: accept multiple --list-cmds optionsgit.c+4 -11 reply
7/12completion: implement and use --list-cmds=allcontrib/completion/git-completion.bash git.c help.c +1 more+22 -10 replies
8/12git: support --list-cmds=<category>generate-cmdlist.sh git.c help.c +1 more+38 -11 reply
9/12help: add "-a --verbose" to list all commands with synopsisDocumentation/git-help.txt builtin/help.c help.c +2 more+36 -10 replies
10/12help: use command-list.txt for the source of guidesDocumentation/gitattributes.txt Documentation/gitmodules.txt Documentation/gitrevisions.txt +5 more+26 -371 reply
11/12command-list.txt: add new category "complete"command-list.txt+17 -160 replies
12/12completion: let git provide the completable command listcontrib/completion/git-completion.bash t/t9902-completion.sh+25 -990 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v4/wip 00/12] Keep all info in command-list.txt in git binary

This is not exactly v4 and likely broken. But I've made several debatable changes and would like your opinions before making even more changes in this direction.

In 03/12 I made a format change in command-list.txt. The group description is no longer in this file but in help.c instead. This simplifies the format. However it may be harder for people to know what category means what (but then it's already so for a lot more categories).

In 11/12 I added the new "complete" category to command-list.txt so that we could replace the giant list in git-completion.bash. This is really questionable because several commands will NOT be completable anymore. These are listed there so we can discuss.

Another thing I wonder is, whether I should tag "nocomplete" instead of "complete" in command-list.txt, similar to parseopt's nocomplete
strategy: commands are completable by default then we just exclude some of them. The "complete" tag goes the opposite direction, we only show ones that are either external, "complete" or mainporcelain.

I think we would go with whitelist than blacklist though to avoid helper commands showing up by default...

Also in 02/12 I moved to fixed column format. Strictly speaking I do not need that (but it makes the code slightly more complex). If you are really against fixed column format, speak up now.

Nguyễn Thái Ngọc Duy (12):
generate-cmds.sh: factor out synopsis extract code generate-cmds.sh: export all commands to command-list.h
help: use command-list.h for common command list Remove common-cmds.h
git.c: convert --list-*builtins to --list-cmds=*
git: accept multiple --list-cmds options
completion: implement and use --list-cmds=all
git: support --list-cmds=<category>
help: add "-a --verbose" to list all commands with synopsis
help: use command-list.txt for the source of guides command-list.txt: add new category "complete"
completion: let git provide the completable command list

 .gitignore                             |   2 +-
 Documentation/git-help.txt             |   4 +-
 Documentation/gitattributes.txt        |   2 +-
 Documentation/gitmodules.txt           |   2 +-
 Documentation/gitrevisions.txt         |   2 +-
 Makefile                               |  16 +--
 builtin/help.c                         |  39 +-----
 command-list.txt                       |  55 ++++----
 contrib/completion/git-completion.bash | 121 +++-------------
 generate-cmdlist.sh                    | 128 +++++++++++------
 git.c                                  |  19 ++-
 help.c                                 | 186 +++++++++++++++++++++----
 help.h                                 |   4 +
 t/t0012-help.sh                        |  11 +-
 t/t9902-completion.sh                  |   5 +-
 15 files changed, 344 insertions(+), 252 deletions(-)
Signature · 1 line
2.17.0.519.gb89679a4aa