Otherwise the other global settings which were already read and set up will be overwritten because the auto-setup code can be called really late in game. For instance, t3901-i18n-patch and --encoding=something of revision argument parser are actually broken at the moment. The parser (handle_revision_opt) sets git_log_output_encoding, which is also updated (or in this case - overwritten) in the default config handler.
The code still has the problem if someone loads the configuration, sets trust_executable_bit according to other conditions (a future command-line option, perhaps) and than causes the init_stat call.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> --- compat/cygwin.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
2008/10/13 Mark Levedahl <mlevedahl@gmail.com>:
Show 11 quoted lines
> static int git_cygwin_config(const char *var, const char *value, void *cb)
> {
> - if (!strcmp(var, "core.ignorecygwinfstricks"))
> - native_stat = git_config_bool(var, value);
> - return 0;
> + if (!strcmp(var, "core.ignorecygwinfstricks")) {
> + native_stat = git_config_bool(var, value);
> + return 0;
> + }
> + return git_default_config(var, value, cb);
> }This actually breaks t3901-i18n-patch (and --encoding=something of revision argument parser). The parser (handle_revision_opt) sets git_log_output_encoding, which is also updated (or in this case - overwritten) in the default config handler.