diff options
-rwxr-xr-x | t/t1300-config.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t1300-config.sh b/t/t1300-config.sh index a59c07fcb7..8a3cd2c114 100755 --- a/t/t1300-config.sh +++ b/t/t1300-config.sh @@ -1472,6 +1472,17 @@ test_expect_failure '--unset last key removes section (except if commented)' ' test_line_count = 3 .git/config ' +test_expect_failure '--unset-all removes section if empty & uncommented' ' + cat >.git/config <<-\EOF && + [section] + key = value1 + key = value2 + EOF + + git config --unset-all section.key && + test_line_count = 0 .git/config +' + test_expect_failure 'adding a key into an empty section reuses header' ' cat >.git/config <<-\EOF && [section] |