submodule--helper: teach config subcommand --unset

This teaches submodule--helper config the --unset option, which removes
the specified configuration key from the .gitmodule file.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Denton Liu
2019-02-08 03:21:31 -08:00
committed by Junio C Hamano
parent 7a4bb55f3a
commit c89c494240
2 changed files with 21 additions and 5 deletions

View File

@ -142,6 +142,15 @@ test_expect_success 'reading submodules config from the working tree with "submo
)
'
test_expect_success 'unsetting submodules config from the working tree with "submodule--helper config --unset"' '
(cd super &&
git submodule--helper config --unset submodule.submodule.url &&
git submodule--helper config submodule.submodule.url >actual &&
test_must_be_empty actual
)
'
test_expect_success 'writing submodules config with "submodule--helper config"' '
(cd super &&
echo "new_url" >expect &&