Subject: Re: [PATCH v2 1/2] dir: consider worktree config in path recursion

From: Junio C Hamano <[email-masked]>
Date: Wed, 11 May 2022 16:07:14 -0700

Goss Geppert <[email-masked]> writes:

> Since 8d92fb2927 (dir: replace exponential algorithm with a linear one,
> 2020-04-01) the following no longer works:
>
>     1) Initialize a repository.
>     2) Set the `core.worktree` location to a parent directory of the
>        default worktree.
>     3) Add a file located in the default worktree location to the index
>        (i.e. anywhere in the immediate parent directory of the gitdir).

I think I've mentioned this ealier, but the above only describes the
scenario and does not say what behaviour is expected and what behaviour
is observed.  "no longer works" is OK, but not sufficient.

Easily remedied by saying "It used to do X, but now it does Y" after
the above description of the scenario to describe what happens and
what you want to happen.

> +	git --git-dir="test1/.git" config core.worktree "$(pwd)" &&

I wonder if this lets funny paths to be added to the index, e.g.
would "git add test1" recursively add everything in that directory?

Thanks.