From: "Alex Riesen" <raa.lkml@gmail.com>
To: "Mark Levedahl" <mlevedahl@gmail.com>
Cc: gitster@pobox.com, spearce@spearce.org, dpotapov@gmail.com,
git@vger.kernel.org
Subject: [PATCH] Only update the cygwin-related configuration during state auto-setup
Date: Thu, 23 Oct 2008 15:07:22 +0200 [thread overview]
Message-ID: <81b0412b0810230607sfea05ddm62bd03f837fc922e@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2008-10-23 13:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-23 13:07 Alex Riesen [this message]
2008-10-23 18:36 ` [PATCH] Only update the cygwin-related configuration during state auto-setup 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81b0412b0810230607sfea05ddm62bd03f837fc922e@mail.gmail.com \
--to=raa.lkml@gmail.com \
--cc=dpotapov@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mlevedahl@gmail.com \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).