Re: [PATCH] config.mak.uname: Define FREAD_READS_DIRECTORIES for GNU/Hurd
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 22, 2020, 17:48 UTC
- Message-ID
- <xmqq368vjtsr.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200422164150.GA140314@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 5 quoted lines
> I wonder why we set up this knob this way. A lot of operating systems > support fopen(..., "r") of a directory --- wouldn't it make sense for > FREAD_READS_DIRECTORIES to be the default and for users on stricter > platforms to be able to set FREAD_DOES_NOT_READ_DIRECTORIES if they > want to speed Git up by taking advantage of their saner fread?
It would have been helped to hear that when we accepted cba22528 (Add compat/fopen.c which returns NULL on attempt to open directory, 2008-02-08). Perhaps back then it was more common not to allow fopen() on a directory? I dunno.
Because we do not very often hear "oops, this system also needs the READS_DIRECTORIES knob set" these days, I consider it a fair game to toggle the polarity of it, once the Hurd patch that started this thread lands, as the vicinity of the code would become quiescent again.