{"thread":{"id":"8257","subject":"[PATCH] t1300: Add tests for git-config --bool --get","startedAt":"2007-05-20T22:12:57Z","lastAt":"2007-05-20T22:12:58Z","messageCount":2,"participants":["Frank Lichtenheld"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"42809","messageId":"11796991783280-git-send-email-frank@lichtenheld.de","threadId":"8257","inReplyTo":null,"subject":"[PATCH] t1300: Add tests for git-config --bool --get","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-05-20T22:12:57Z","receivedAt":"2007-05-20T22:12:57Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Noticed that there were only tests for --int, but not\nfor --bool. Add some.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n t/t1300-repo-config.sh |   34 ++++++++++++++++++++++++++++++++++\n 1 files changed, 34 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex a1d777c..3f3fd2d 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -436,6 +436,40 @@ test_expect_success numbers '\n \ttest z1048576 = \"z$m\"\n '\n \n+cat > expect << EOF\n+true\n+false\n+true\n+false\n+true\n+false\n+true\n+false\n+EOF\n+\n+test_expect_success bool '\n+\n+\tgit-config bool.true1 01 &&\n+\tgit-config bool.true2 -1 &&\n+\tgit-config bool.true3 YeS &&\n+\tgit-config bool.true4 true &&\n+\tgit-config bool.false1 000 &&\n+\tgit-config bool.false2 \"\" &&\n+\tgit-config bool.false3 nO &&\n+\tgit-config bool.false4 FALSE &&\n+\trm -f result &&\n+\tfor i in 1 2 3 4\n+\tdo\n+\t    git-config --bool --get bool.true$i >>result\n+\t    git-config --bool --get bool.false$i >>result\n+        done &&\n+\tcmp expect result'\n+\n+test_expect_failure 'invalid bool' '\n+\n+\tgit-config bool.nobool foobar &&\n+\tgit-config --bool --get bool.nobool'\n+\n rm .git/config\n \n git-config quote.leading \" test\"\n-- \n1.5.2-rc3.GIT\n"},{"id":"42810","messageId":"11796991782027-git-send-email-frank@lichtenheld.de","threadId":"8257","inReplyTo":"11796991783280-git-send-email-frank@lichtenheld.de","subject":"[PATCH] git-config: Correct asciidoc documentation for --int/--bool","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-05-20T22:12:58Z","receivedAt":"2007-05-20T22:12:58Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"The asciidoc documentation seemed to indicate that type specifiers\nare honoured on writing operations which they aren't. Make this\nmore clear.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-config.txt |   17 +++++++++--------\n 1 files changed, 9 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 280ef20..827a499 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -9,15 +9,15 @@ git-config - Get and set repository or global options\n SYNOPSIS\n --------\n [verse]\n-'git-config' [--system | --global] [type] name [value [value_regex]]\n-'git-config' [--system | --global] [type] --add name value\n-'git-config' [--system | --global] [type] --replace-all name [value [value_regex]]\n+'git-config' [--system | --global] name [value [value_regex]]\n+'git-config' [--system | --global] --add name value\n+'git-config' [--system | --global] --replace-all name [value [value_regex]]\n 'git-config' [--system | --global] [type] --get name [value_regex]\n 'git-config' [--system | --global] [type] --get-all name [value_regex]\n-'git-config' [--system | --global] [type] --unset name [value_regex]\n-'git-config' [--system | --global] [type] --unset-all name [value_regex]\n-'git-config' [--system | --global] [type] --rename-section old_name new_name\n-'git-config' [--system | --global] [type] --remove-section name\n+'git-config' [--system | --global] --unset name [value_regex]\n+'git-config' [--system | --global] --unset-all name [value_regex]\n+'git-config' [--system | --global] --rename-section old_name new_name\n+'git-config' [--system | --global] --remove-section name\n 'git-config' [--system | --global] -l | --list\n \n DESCRIPTION\n@@ -36,7 +36,8 @@ prepend a single exclamation mark in front (see EXAMPLES).\n The type specifier can be either '--int' or '--bool', which will make\n 'git-config' ensure that the variable(s) are of the given type and\n convert the value to the canonical form (simple decimal number for int,\n-a \"true\" or \"false\" string for bool). If no type specifier is passed,\n+a \"true\" or \"false\" string for bool).  Type specifiers currently only\n+take effect for reading operations.  If no type specifier is passed,\n no checks or transformations are performed on the value.\n \n This command will fail if:\n-- \n1.5.2-rc3.GIT\n"}]}