[PATCH] Only update the cygwin-related configuration during state auto-setup

DORMANTno replies

2 messages, 1 author, 2016-06-15 · open the first message on its own page

[PATCH] Only update the cygwin-related configuration during state auto-setup

From: Alex Riesen <hidden>
Date: 2016-06-15 22:45:31

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 <redacted>
---
 compat/cygwin.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

2008/10/13 Mark Levedahl [off-list ref]:
 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.

Re: [PATCH] Only update the cygwin-related configuration during state auto-setup

From: Alex Riesen <hidden>
Date: 2016-06-15 22:45:31

Err... It should be: "Only update the cygwin-related configuration
during stat auto-setup".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help