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

Re: [PATCH] config.txt: add completion for include, includeIf

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 13, 2022, 19:52 UTC
Message-ID
<xmqqv8s0bxj8.fsf@gitster.g>
In-Reply-To
<pull.1285.git.1657738937049.gitgitgadget@gmail.com>
"Manuel Boni via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 9 quoted lines
> From: Manuel Boni <ziosombrero@gmail.com>
>
> Git config's tab completion does not yet know about the "include"
> and "includeIf" sections, nor the related "path" variable.
>
> Add tab completion support for the aforementioned items,
> along with two new tests, based on the existing ones,
> specifically for this completion. Variable completion only works
> for "include" for now.

You may have started this work for tab completion, but I think you should describe it as adding missing documentation (this comment extends to the title of the patch, too). The work to teach "tab completion" about the variables "git config" can take has done long time ago, and the work by this patch to add description for <include> and <includeIf> is used as an input to that previous work, which results in "git config inc<TAB>" to be command line completed.

Show 5 quoted lines
> Credit for the ideas behind this patch goes to
> Ævar Arnfjörð Bjarmason.
>
> Signed-off-by: Manuel Boni <ziosombrero@gmail.com>
> Based-on-patch-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>

The order of these two is backwards, no? Ævar may have written something that inspire you to arrive at this version, which you signed off before sending it out.

> +include.path::
> +
> +includeIf.<condition>.path::

Losing the extra blank line will make it clearer, if your intention is that the next lines apply to both of the above two.

> +	Special variables to include other configuration files. See
> +	the "CONFIGURATION FILE" section in the main
> +	linkgit:git-config[1] documentation.
Thanks.
Previous: Jeff KingNext: Manuel Boni via GitGitGadget
Message 3 of 6 in “config.txt: add completion for include, includeIf”
  1. config.txt: add completion for include, includeIfManuel Boni via GitGitGadget, Jul 13, 2022
  2. Jeff KingJul 13, 2022
  3. Junio C HamanoJul 13, 2022
  4. config.txt: document include, includeIfManuel Boni via GitGitGadget, Jul 16, 2022
  5. Jeff KingJul 16, 2022
  6. Jeff KingJul 14, 2022

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.