From: Alex Vandiver <alex@chmrr.net>
To: git@vger.kernel.org
Subject: [PATCH] Test the interaction of --bool and --get-regexp on a key with no explicit value
Date: Thu, 26 Aug 2010 13:45:16 -0400 [thread overview]
Message-ID: <1282844716-30591-1-git-send-email-alex@chmrr.net> (raw)
Signed-off-by: Alex Vandiver <alex@chmrr.net>
---
This test currently fails -- I don't have time to track down the fix,
but I figured that at least I could provide a failing test. Note that
--null isn't necessary for the failure; without it, one gets
"section.sub=section.val5true", with no spacing between the key and
value.
t/t1300-repo-config.sh | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 074f2f2..147e0e6 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -816,6 +816,16 @@ echo >>result
test_expect_success '--null --get-regexp' 'cmp result expect'
+cat > expect <<\EOF
+section.sub=section.val5
+trueQ
+EOF
+
+git config --null --bool --get-regexp 'val5' | perl -pe 'y/\000/Q/' > result
+echo >>result
+
+test_expect_success '--null --get-regexp --bool' 'cmp result expect'
+
test_expect_success 'inner whitespace kept verbatim' '
git config section.val "foo bar" &&
test "z$(git config section.val)" = "zfoo bar"
--
1.7.2.2.458.g8d9c8
next reply other threads:[~2010-08-26 18:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-26 17:45 Alex Vandiver [this message]
2010-08-26 20:49 ` [PATCH] config: Print the delimeter of intuited --bool values under --get-regexp alex
2010-08-27 3:17 ` Jonathan Nieder
2010-08-27 3:15 ` [PATCH] Test the interaction of --bool and --get-regexp on a key with no explicit value Jonathan Nieder
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=1282844716-30591-1-git-send-email-alex@chmrr.net \
--to=alex@chmrr.net \
--cc=git@vger.kernel.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).