author | Junio C Hamano <gitster@pobox.com> | |
Fri, 24 Oct 2008 05:54:09 +0000 (22:54 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 28 Oct 2008 16:12:49 +0000 (09:12 -0700) | ||
commit | 797484392a823c66bd846545a43d76aa2c64f5ff | |
tree | bc9a647d52154bf619843ebc3633d4bf6275fed1 | tree | snapshot |
parent | 304d058370a9a797c38ec739c6d39fa45d9ed8e5 | commit | diff |
compat/cygwin.c: make runtime detection of lstat/stat lessor impact
The original patch that lead to an earlier commit adbc0b6 (cygwin: Use
native Win32 API for stat, 2008-09-30) did not call git_default_config()
and it was a good thing. The lazy config reading when lstat/stat is
called for the first time to find out if core.filemode is set can happen
anytime in the calling program. If it happens after the calling program
parsed the configuration file to prime its default parameter settings and
processed its command line parameters to tweak them, this will overwrite
the values set by the program with the values read from the config file.
This essentially reverts the code to the version as submitted by Mark,
with a bit more comments to clarify why we do not fall back on the default
configuration parser from git_cygwin_config().
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The original patch that lead to an earlier commit adbc0b6 (cygwin: Use
native Win32 API for stat, 2008-09-30) did not call git_default_config()
and it was a good thing. The lazy config reading when lstat/stat is
called for the first time to find out if core.filemode is set can happen
anytime in the calling program. If it happens after the calling program
parsed the configuration file to prime its default parameter settings and
processed its command line parameters to tweak them, this will overwrite
the values set by the program with the values read from the config file.
This essentially reverts the code to the version as submitted by Mark,
with a bit more comments to clarify why we do not fall back on the default
configuration parser from git_cygwin_config().
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/cygwin.c | diff | blob | history |