Re: [PATCH] sha1_file: use access(), not lstat(), if possible

2017-07-25 Thread Johannes Schindelin
Hi, On Sat, 22 Jul 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > But this whole thread taps into a gripe I have with parts of Git's code > > base: part of the code is not clear at all in its intent by virtue of > > calling whatever POSIX function

Re: [PATCH] sha1_file: use access(), not lstat(), if possible

2017-07-22 Thread Junio C Hamano
Johannes Schindelin writes: > But this whole thread taps into a gripe I have with parts of Git's code > base: part of the code is not clear at all in its intent by virtue of > calling whatever POSIX function may seem to give the answer for the > intended question,

Re: [PATCH] sha1_file: use access(), not lstat(), if possible

2017-07-22 Thread Johannes Schindelin
Hi, On Thu, 20 Jul 2017, Junio C Hamano wrote: > Jonathan Tan writes: > > > In sha1_loose_object_info(), use access() (indirectly invoked through > > has_loose_object()) instead of lstat() if we do not need the on-disk > > size, as it should be faster on Windows [1].

Re: [PATCH] sha1_file: use access(), not lstat(), if possible

2017-07-20 Thread Junio C Hamano
Jonathan Tan writes: > In sha1_loose_object_info(), use access() (indirectly invoked through > has_loose_object()) instead of lstat() if we do not need the on-disk > size, as it should be faster on Windows [1]. That sounds as if Windows is the only thing that matters.

[PATCH] sha1_file: use access(), not lstat(), if possible

2017-07-19 Thread Jonathan Tan
In sha1_loose_object_info(), use access() (indirectly invoked through has_loose_object()) instead of lstat() if we do not need the on-disk size, as it should be faster on Windows [1]. [1] https://public-inbox.org/git/alpine.DEB.2.21.1.1707191450570.4193@virtualbox/ Signed-off-by: Jonathan Tan