From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Stefan Beller <sbeller@google.com>
Subject: [PATCH 0/3] Resending sb/config-write-fix
Date: Wed, 8 Aug 2018 12:50:17 -0700 [thread overview]
Message-ID: <20180808195020.37374-1-sbeller@google.com> (raw)
This is a resend of sb/config-write-fix, with a slightly
better commit message and a renamed variable.
Thanks,
Stefan
Stefan Beller (3):
t1300: document current behavior of setting options
config: fix case sensitive subsection names on writing
git-config: document accidental multi-line setting in deprecated
syntax
Documentation/git-config.txt | 21 +++++++++
config.c | 12 ++++-
t/t1300-config.sh | 87 ++++++++++++++++++++++++++++++++++++
3 files changed, 119 insertions(+), 1 deletion(-)
./git-range-diff origin/sb/config-write-fix...HEAD >>0000-cover-letter.patch
2.18.0.597.ga71716f1ad-goog
1: 999d9026272 ! 1: e40f57f3da1 t1300: document current behavior of setting options
@@ -7,7 +7,6 @@
for the follow up that will fix some issues with the current behavior.
Signed-off-by: Stefan Beller <sbeller@google.com>
- Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/t/t1300-config.sh b/t/t1300-config.sh
--- a/t/t1300-config.sh
2: c667e555066 ! 2: f01cb1d9dae config: fix case sensitive subsection names on writing
@@ -2,8 +2,8 @@
config: fix case sensitive subsection names on writing
- A use reported a submodule issue regarding strange case indentation
- issues, but it could be boiled down to the following test case:
+ A user reported a submodule issue regarding a section mix-up,
+ but it could be boiled down to the following test case:
$ git init test && cd test
$ git config foo."Bar".key test
@@ -32,7 +32,6 @@
Reported-by: JP Sugarbroad <jpsugar@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
- Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/config.c b/config.c
--- a/config.c
@@ -41,7 +40,7 @@
int eof;
struct strbuf value;
struct strbuf var;
-+ unsigned section_name_old_dot_style : 1;
++ unsigned subsection_case_sensitive : 1;
int (*do_fgetc)(struct config_source *c);
int (*do_ungetc)(int c, struct config_source *conf);
@@ -49,7 +48,7 @@
static int get_extended_base_var(struct strbuf *name, int c)
{
-+ cf->section_name_old_dot_style = 0;
++ cf->subsection_case_sensitive = 0;
do {
if (c == '\n')
goto error_incomplete_line;
@@ -57,7 +56,7 @@
static int get_base_var(struct strbuf *name)
{
-+ cf->section_name_old_dot_style = 1;
++ cf->subsection_case_sensitive = 1;
for (;;) {
int c = get_next_char();
if (cf->eof)
@@ -70,7 +69,7 @@
if (cf->var.len < 2 || cf->var.buf[cf->var.len - 1] != '.')
return error("invalid section name '%s'", cf->var.buf);
-+ if (cf->section_name_old_dot_style)
++ if (cf->subsection_case_sensitive)
+ cmpfn = strncasecmp;
+ else
+ cmpfn = strncmp;
3: 6749bb283a8 ! 3: 6b5ad773490 git-config: document accidental multi-line setting in deprecated syntax
@@ -29,7 +29,6 @@
spend time on fixing the behavior and just document it instead.
Signed-off-by: Stefan Beller <sbeller@google.com>
- Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
--- a/Documentation/git-config.txt
next reply other threads:[~2018-08-08 19:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-08 19:50 Stefan Beller [this message]
2018-08-08 19:50 ` [PATCH 1/3] t1300: document current behavior of setting options Stefan Beller
2018-08-08 19:50 ` [PATCH 2/3] config: fix case sensitive subsection names on writing Stefan Beller
2018-08-08 19:50 ` [PATCH 3/3] git-config: document accidental multi-line setting in deprecated syntax Stefan Beller
2018-08-08 20:28 ` [PATCH 0/3] Resending sb/config-write-fix Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180808195020.37374-1-sbeller@google.com \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).