diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-09-09 12:53:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-09 12:53:57 -0700 |
commit | 93424a0fd882a3ed1c1f7a8b6fe71fdaa21cce99 (patch) | |
tree | b20b3ed1d2c1ecad9d7bc09a6679ed24015dfe36 /t | |
parent | Merge branch 'bc/imap-send-doc' (diff) | |
parent | config: teach "git -c" to recognize an empty string (diff) | |
download | tgif-93424a0fd882a3ed1c1f7a8b6fe71fdaa21cce99.tar.xz |
Merge branch 'jk/command-line-config-empty-string'
"git -c section.var command" and "git -c section.var= command"
should pass the configuration differently (the former should be
a boolean true, the latter should be an empty string).
* jk/command-line-config-empty-string:
config: teach "git -c" to recognize an empty string
Diffstat (limited to 't')
-rwxr-xr-x | t/t1300-repo-config.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index fb871d09cd..938fc8bfd7 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -1010,6 +1010,17 @@ test_expect_success 'git -c "key=value" support' ' test_must_fail git -c name=value config core.name ' +# We just need a type-specifier here that cares about the +# distinction internally between a NULL boolean and a real +# string (because most of git's internal parsers do care). +# Using "--path" works, but we do not otherwise care about +# its semantics. +test_expect_success 'git -c can represent empty string' ' + echo >expect && + git -c foo.empty= config --path foo.empty >actual && + test_cmp expect actual +' + test_expect_success 'key sanity-checking' ' test_must_fail git config foo=bar && test_must_fail git config foo=.bar && |