Re: [PATCH v2 1/2] dir: consider worktree config in path recursion
- From
- oss dev <gg.oss.dev@gmail.com>
- Date
- May 20, 2022, 20:01 UTC
- Message-ID
- <CAAA5oLkpATLtxgLDg3tZzSZLd_cUGkOeDrMN-5QgTqPOhRRAOg@mail.gmail.com>
- In-Reply-To
- <xmqqsfpfhdnh.fsf@gitster.g>
> 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.
I've updated the commit message for the fact that using option `--git-dir` can also cause the traversal to skip over the repository. I've therefore had to be a bit more generic in the description, so let me know if it's not specific enough.
> > + 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?
Yes, it would recursively add files inside test1. I've added testcase 3c which I believe does what we want but let me know if that doesn't address your question.