git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Alex Riesen <raa.lkml@gmail.com>
Date
Oct 23, 2008, 13:07 UTC
Message-ID
<81b0412b0810230607sfea05ddm62bd03f837fc922e@mail.gmail.com>

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.

Next: Alex Riesen
Message 1 of 7 in “Only update the cygwin-related configuration during state auto-setup”
  1. Only update the cygwin-related configuration during state auto-setupAlex Riesen, Oct 23, 2008
  2. Alex RiesenOct 23, 2008
  3. Junio C HamanoOct 24, 2008
  4. Alex RiesenOct 24, 2008
  5. Nanako ShiraishiOct 27, 2008
  6. Junio C HamanoOct 28, 2008
  7. Alex RiesenOct 28, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.