diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-05-16 02:51:56 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-16 02:51:56 (GMT) |
commit | 883247c2fc1783b448fb8730284de85a758dc05d (patch) | |
tree | a0592cbc3660042e0b4b9780f419e1b7469f8836 /t | |
parent | 4875663703154974a71e8c706f257464b3f223e5 (diff) | |
parent | db4eca1feaafa0669b7ba64c10314dfe8836576a (diff) | |
download | git-883247c2fc1783b448fb8730284de85a758dc05d.zip git-883247c2fc1783b448fb8730284de85a758dc05d.tar.gz git-883247c2fc1783b448fb8730284de85a758dc05d.tar.bz2 |
Merge branch 'jn/clone-add-empty-config-from-command-line'
"git clone --config var=val" is a way to populate the
per-repository configuration file of the new repository, but it did
not work well when val is an empty string. This has been fixed.
* jn/clone-add-empty-config-from-command-line:
clone: handle empty config values in -c
Diffstat (limited to 't')
-rwxr-xr-x | t/t5611-clone-config.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t5611-clone-config.sh b/t/t5611-clone-config.sh index e4850b7..39329eb 100755 --- a/t/t5611-clone-config.sh +++ b/t/t5611-clone-config.sh @@ -19,6 +19,14 @@ test_expect_success 'clone -c can set multi-keys' ' test_cmp expect actual ' +test_expect_success 'clone -c can set multi-keys, including some empty' ' + rm -rf child && + git clone -c credential.helper= -c credential.helper=hi . child && + printf "%s\n" "" hi >expect && + git --git-dir=child/.git config --get-all credential.helper >actual && + test_cmp expect actual +' + test_expect_success 'clone -c without a value is boolean true' ' rm -rf child && git clone -c core.foo . child && |