Re: [PATCH] add GIT_FAST_STAT mode for Cygwin
- From
Dmitry Potapov <dpotapov@gmail.com>
- Date
- Sep 23, 2008, 17:12 UTC
- Message-ID
- <20080923171209.GP21650@dpotapov.dyndns.org>
- In-Reply-To
- <20080923153148.GI3669@spearce.org>
On Tue, Sep 23, 2008 at 08:31:48AM -0700, Shawn O. Pearce wrote:
Show 7 quoted lines
> > I wonder, should this be controlled by an environment variable? > > Given your description of the feature it seems to be more a property > of the specific repository, as it is based upon where the repository > lives within the Cygwin namespace. Should this be controlled instead > by say a "core.cygwinnativestat = true" configuration property?
I am not sure that you will find many people who will want to set this option per repository, yet Git has the configuration file, and I agree it is better to place it there.
However, this option is Cygwin specific, so I am not sure where it should be read. Should I place it in git_default_core_config like this:
#ifdef __CYGWIN__
if (!strcmp(var, "core.cygwinnativestat")) {
cygwin_native_stat = git_config_bool(var, value);
return 0;
}
#endifSo far, we have not had any system specific options here. So, perhaps, it is better to leave git_default_core_config alone and just replace get_env(GIT_FAST_STAT) with git_config_bool() in the cygwin specific code.
Dmitry