Re: [PATCH 20/24] update-index: test the system before enabling untracked cache
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 21, 2015, 18:51 UTC
- Message-ID
- <xmqqvbk0vug9.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CACsJy8CDgUWEE=QKAgw4G8pgA-cOmLMs4sH67C47Ohd5XJQDNQ@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 14 quoted lines
> On Wed, Jan 21, 2015 at 3:32 PM, Junio C Hamano <gitster@pobox.com> wrote: >> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes: >> >>> Helped-by: Eric Sunshine <sunshine@sunshineco.com> >>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> >>> Signed-off-by: Junio C Hamano <gitster@pobox.com> >>> --- >> >> It appears that this hijacks a fixed name dir-mtime-test at the root >> level of every project managed by Git. Is that intended? > > I did think about filename clash, but I chose a fixed name anyway for > simplicity, otherwise we would need to reconstruct paths > "dir-mtime-test/..." in many places.
If you stuff the name of test directory (default "dir-mtime-test") in a strbuf and formulate test paths by chomping to the original and then appending "/..." at the end, like your remove_test_directory() already does, wouldn't that be sufficient?
>> Shouldn't --use-untracked-cache option require the working tree >> (i.e. die in a bare repository)? > > setup_work_tree() takes care of that
OK, thanks.