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

[PATCH] Test the interaction of --bool and --get-regexp on a key with no explicit value

From
Alex Vandiver <alex@chmrr.net>
Date
Aug 26, 2010, 17:45 UTC
Message-ID
<1282844716-30591-1-git-send-email-alex@chmrr.net>
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: alex@chmrr.net
Message 1 of 4 in “Test the interaction of --bool and --get-regexp on a key with no explicit value”
  1. Test the interaction of --bool and --get-regexp on a key with no explicit valueAlex Vandiver, Aug 26, 2010
  2. config: Print the delimeter of intuited --bool values under --get-regexpalex@chmrr.net, Aug 26, 2010
  3. Jonathan NiederAug 27, 2010
  4. Jonathan NiederAug 27, 2010

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.