diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-09-19 14:05:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-19 14:05:10 -0700 |
commit | 04cd47f553796263451c946061e175d847f388c3 (patch) | |
tree | 24bad2f1f907961c2e2af06f395b8b0fb3258fc7 /t | |
parent | 723361a572e8c9fe93f00b17a1f4ed02585923b2 (diff) | |
parent | a789ca70e7a5b02973b116d21674acd795238f99 (diff) | |
download | git-04cd47f553796263451c946061e175d847f388c3.tar.gz |
Merge branch 'jk/command-line-config-empty-string' into maint
* jk/command-line-config-empty-string:
config: teach "git -c" to recognize an empty string
Conflicts:
config.c
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 3f80ff0c14..46f6ae2571 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 && |