Re: [Bug report] includeIf config is not displayed in normal directories
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 16, 2020, 23:24 UTC
- Message-ID
- <xmqq5z512v2r.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAPQE4+rhWT9kgusNXOw5cnJ-oFq++4G1FMaXvQ3wppQ0GE0hSA@mail.gmail.com>
Stuart MacDonald <stuartm.coding@gmail.com> writes:
Show 12 quoted lines
> My old understanding of git clone: > - create sub-directory > - create subdir/.git and whatever initial states are needed > - clone the repo from origin into the directory > - all never having left $CWD > > It's actually: > - create sub-directory > - cd subdir > - create ./.git and initial states > - clone the repo _while inside_ a gitdir > - cd ..
I am not sure how the above two should make any difference with the [includeif "gitdir:<pattern>"] matching. Regardless of where your $CWD is, the inclusion is decided on the location of the .git/ directory we are dealing with, so as long as "subdir/.git" matches the pattern given to "gitdir:<pattern>" the inclusion should work the same way even if the internal implementation of "git clone" changes between the above two.
IIRC "includeif" is a Peff's brainchild, so I'd ask him to correct any mistakes in the above paragraph, but I am a bit puzzled as to what the true misunderstanding is, where the misunderstanding came from, and which documentation if any we should look into improving.
Thanks.