git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Only update the cygwin-related configuration during state auto-setup
@ 2008-10-23 13:07 Alex Riesen
  2008-10-23 18:36 ` Alex Riesen
  2008-10-24  5:54 ` Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Alex Riesen @ 2008-10-23 13:07 UTC (permalink / raw)
  To: Mark Levedahl; +Cc: gitster, spearce, dpotapov, git

[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]

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>:
>  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.

[-- Attachment #2: 0001-Only-update-the-cygwin-related-configuration-during.patch --]
[-- Type: application/xxxxx, Size: 1669 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-28 12:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-23 13:07 [PATCH] Only update the cygwin-related configuration during state auto-setup Alex Riesen
2008-10-23 18:36 ` Alex Riesen
2008-10-24  5:54 ` Junio C Hamano
2008-10-24  7:47   ` Alex Riesen
2008-10-27 10:20   ` Nanako Shiraishi
2008-10-28  3:27     ` Junio C Hamano
2008-10-28 12:21       ` Alex Riesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).