Thread (10 messages) flat view 10 messages, 5 authors, 2016-06-15

Re: [PATCH 4/4] cygwin: Use native Win32 API for stat

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:25

Johannes Sixt [off-list ref] wrote:
On Samstag, 27. September 2008, Dmitry Potapov wrote:
quoted
On Sat, Sep 27, 2008 at 08:35:03PM +0200, Johannes Sixt wrote:
quoted
quoted
+core.cygwinNativeStat::
This name is *really* odd, for two reasons:
...
quoted
It was Shawn's suggestion. I don't care much about the name as long as
it is explained in the documentation... Therefore, I accepted what Shawn
said without giving it any thought.
Shawn is an importen git-o-maniac, but it's certainly not blasphemy to 
question his words of wisdom ;)
As Hannes points out, blindly accepting anything I say might not
be a good idea.  I have my moments of sanity, but I'm far, far
from perfect.  ;-)
My point is that emphasis on "stat" in the name is wrong: That's about 
implementation, but not about the effect. Why wouldn't 'ignoreCygwinFSTricks' 
be specific enough?
I like this a lot better.  I could see us also bypassing other Cygwin
functions like open() in order to get faster system calls for Git.
Since it would be byassing the same Cygwin path name translation
code it should be controlled by the same flag.
(And the length of the name doesn't 
worry me, considering how many people would want to change the default.)
Agreed.  Most people setting it would copy and paste from the
documentation anyway.

I wonder though if we can't automatically implement it by grabbing
a copy of the Cygwin mount table and comparing those paths to
$GIT_DIR or $GIT_WORK_TREE.  If any mount table entry is contained
within either of them then we know we can't use the native stat.
Its rather common for neither of these to contain a mount point,
and it is therefore easy to enable the native stat.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help