[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH 4/4] cygwin: Use native Win32 API for stat
From:       "Shawn O. Pearce" <spearce () spearce ! org>
Date:       2008-09-29 15:34:00
Message-ID: 20080929153400.GJ17584 () spearce ! org
[Download RAW message or body]

Johannes Sixt <johannes.sixt@telecom.at> wrote:
> On Samstag, 27. September 2008, Dmitry Potapov wrote:
> > On Sat, Sep 27, 2008 at 08:35:03PM +0200, Johannes Sixt wrote:
> > > > +core.cygwinNativeStat::
> > >
> > > This name is *really* odd, for two reasons:
> ...
> > 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic