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

Re: [Patch 2/3] Documentation/config.txt: add worktree includeIf conditionals.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 14, 2021, 01:04 UTC
Message-ID
<xmqqr1g1zow4.fsf@gitster.g>
In-Reply-To
<20210712223139.24409-3-randall.becker@nexbridge.ca>
randall.becker@nexbridge.ca writes:
Show 25 quoted lines
> From: "Randall S. Becker" <rsbecker@nexbridge.com>
>
> Documentation of the worktree and worktree/i conditionals is add based on
> gitdir rules except that the trailing / form of the path is not supported.
>
> Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
> ---
>  Documentation/config.txt | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index bf82766a6a..7e951937ae 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -143,7 +143,16 @@ refer to linkgit:gitignore[5] for details. For convenience:
>  
>  `gitdir/i`::
>  	This is the same as `gitdir` except that matching is done
> -	case-insensitively (e.g. on case-insensitive file systems)
> +	case-insensitively (e.g. on case-insensitive file systems).
> +
> +`worktree`::
> +	This is similar to `gitdir` except that matching is done with
> +	the path of a worktree instead of the main repository. Unlike
> +	`gitdir`, the trailing / form of the worktree path is not supported.
It is not immediately obvious what "the trailing / form" means.

Does it refer to the 4th item in the 4-bullet list in the description just above the patch context (I am trying to make a guess here)?

The problem I perceive in this description is that there is no phrase "trailing" in the vicinity of what readers have read so far; readers who are not exactly familiar with the system may need a bit more assurance that they guessed correctly.

    Unlike `gitdir`, `**` will not be automatically added to a
    pattern that ends with `/`
would be easier to give that assurance, albeit more verbosely.

Assuming that I guessed correctly, is this a deliberate design decision not to "automatically add ** after a pattern that ends with a slash", and if so why? I would have thought that "in the worktrees that I create inside /var/tmp/, please enable these configuration variables" would be a fairly natural thing to ask, and I do not immediately see a reason why we want to apply different syntax rules between "gitdir" and "worktree".

Thanks.
Previous: randall.becker@nexbridge.caNext: Randall S. Becker
Message 5 of 9 in “includeIf series for worktrees”
  1. 0/3 includeIf series for worktreesrandall.becker@nexbridge.ca, Jul 12, 2021
  2. 1/3 config.c: add conditional include based on worktree.randall.becker@nexbridge.ca, Jul 12, 2021
  3. Johannes SchindelinJul 13, 2021
  4. 2/3 Documentation/config.txt: add worktree includeIf conditionals.randall.becker@nexbridge.ca, Jul 12, 2021
  5. Junio C HamanoJul 14, 2021
  6. Randall S. BeckerJul 14, 2021
  7. Junio C HamanoJul 14, 2021
  8. Randall S. BeckerJul 14, 2021
  9. 3/3 t1305: add tests for includeIf:worktree.randall.becker@nexbridge.ca, Jul 12, 2021

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.