Re: [PATCH] add GIT_FAST_STAT mode for Cygwin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dmitry Potapov <dpotapov@xxxxxxxxx> wrote:
> I am not sure that I understand what you are trying to do here.
...
> Did you mean this:
...
> if (have_git_dir()) {
> 	git_config(git_cygwin_config, NULL);
> 	cygwin_stat_fn = native_stat ? cygwin_stat : stat;
> 	cygwin_lstat_fn = native_stat ? cygwin_lstat : lstat;
> }

Err, yes, something more like that.
 
> > > static int cygwin_stat_choice(const char *file_name, struct stat *buf)
> > > {
> > > 	init_stat();
> > > 	return (*cygwin_stat_fn)(file_name, buf);
> 
> change the above line to:
> 	return (cygwin_stat_fn ? cygwin_stat_fn : stat) (file_name, buf);

Right.
 
> so init_stat may be called a few times outside of git directory and then
> use the default cygwin function, and once we enter to it then load the
> configuration option and act accordingly.

Yup, exactly.  Sorry I wasn't being very clear earlier.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux