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

Re: [PATCH 2/2] completion: add 'revisions' and 'everyday' to 'git help'

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 24, 2016, 20:08 UTC
Message-ID
<xmqq7fgr8wqc.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1458844034-12855-3-git-send-email-ralf.thielow@gmail.com>
Ralf Thielow <ralf.thielow@gmail.com> writes:
> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
> ---
>  contrib/completion/git-completion.bash | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

It is somewhat silly that we have to maintain this list to be in sync with the set of documents we offer. Wouldn't it make more sense to go in the direction of _removing_ this list of hardcoded words here?

The first step may be to teach a new subcommand to "git help" to show a list of these words, and then _git_help can use it to lazily compute the list just like __git_commands does.

But this change itself is not wrong per-se; will queue to see where follow-up discussion will lead us to.

Thanks.
Show 15 quoted lines
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 70f4171..ffe6004 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1346,8 +1346,8 @@ _git_help ()
>  	__git_compute_all_commands
>  	__gitcomp "$__git_all_commands $(__git_aliases)
>  		attributes cli core-tutorial cvs-migration
> -		diffcore gitk glossary hooks ignore modules
> -		namespaces repository-layout tutorial tutorial-2
> +		diffcore everyday gitk glossary hooks ignore modules
> +		namespaces repository-layout revisions tutorial tutorial-2
>  		workflows
>  		"
>  }
Previous: Ralf ThielowNext: Philip Oakley
Message 5 of 7 in “completion: git-help: add missing option and params”
  1. 0/2 completion: git-help: add missing option and paramsRalf Thielow, Mar 24, 2016
  2. 1/2 completion: add option '--guides' to 'git help'Ralf Thielow, Mar 24, 2016
  3. Junio C HamanoMar 24, 2016
  4. 2/2 completion: add 'revisions' and 'everyday' to 'git help'Ralf Thielow, Mar 24, 2016
  5. Junio C HamanoMar 24, 2016
  6. Philip OakleyMar 24, 2016
  7. Junio C HamanoMar 24, 2016

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.