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

Re: [PATCH] completion: add more parameter value completion

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 11, 2019, 18:52 UTC
Message-ID
<xmqqbm3ii2ek.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190129102111.15333-1-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
Show 8 quoted lines
> This adds value completion for a couple more paramters. To make it
> easier to maintain these hard coded lists, add a comment at the original
> list/code to remind people to update git-completion.bash too.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
>  This 6 month old patch was part of the attempt to automate value
>  completion. That might never come, but at least this is still good.
Perhaps this is not yet good without proofreading.
Show 12 quoted lines
> diff --git a/builtin/help.c b/builtin/help.c
> index 7739a5c155..eef8b7c802 100644
> --- a/builtin/help.c
> +++ b/builtin/help.c
> @@ -70,6 +70,10 @@ static enum help_format parse_help_format(const char *format)
>  		return HELP_FORMAT_INFO;
>  	if (!strcmp(format, "web") || !strcmp(format, "html"))
>  		return HELP_FORMAT_WEB;
> +	/*
> +	 * Please update _git_config() in git-completion.bash when you
> +	 * add new rebase modes.
> +	 */
Huh?  s/rebase modes/help formats/, I guess.
>  	die(_("unrecognized help format '%s'"), format);
>  }
Show 11 quoted lines
> diff --git a/builtin/replace.c b/builtin/replace.c
> index affcdfb416..1c312725d1 100644
> --- a/builtin/replace.c
> +++ b/builtin/replace.c
> @@ -82,6 +82,10 @@ static int list_replace_refs(const char *pattern, const char *format)
>  		data.format = REPLACE_FORMAT_MEDIUM;
>  	else if (!strcmp(format, "long"))
>  		data.format = REPLACE_FORMAT_LONG;
> +	/*
> +	 * Please update _git_replace() in git-completion.bash when
> +	 * you add ne format
s/ne/&w/;
Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 2 of 3 in “completion: add more parameter value completion”
  1. completion: add more parameter value completionNguyễn Thái Ngọc Duy, Jan 29, 2019
  2. Junio C HamanoFeb 11, 2019
  3. completion: add more parameter value completionNguyễn Thái Ngọc Duy, Feb 16, 2019

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.