t1300: remove unreasonable expectation from TODO

In https://public-inbox.org/git/7vvc8alzat.fsf@alter.siamese.dyndns.org/ a reasonable patch was made quite a bit less so by changing a test case demonstrating a bug to a test case that demonstrates that we ask for too much: the test case 'unsetting the last key in a section removes header' now expects a future bug fix to be able to determine whether a free-form comment above a section header refers to said section or not. Rather than shooting for the stars (and not even getting off the ground), let's start shooting for something obtainable and be reasonably confident that we *can* get it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Apr 3, 2018 at 18:28 UTC dde154b5bd84e6258b496498901eb24b4914ec6b
1 file changed +20 -1
t/t1300-config.sh
+20 -1
@@ -1390,7 +1390,7 @@ test_expect_success 'urlmatch with wildcard' '
1390 '
1391
1392 # good section hygiene
1393 -test_expect_failure 'unsetting the last key in a section removes header' '
1393 +test_expect_failure '--unset last key removes section (except if commented)' '
1394 cat >.git/config <<-\EOF &&
1395 # some generic comment on the configuration file itself
1396 # a comment specific to this "section" section.
@@ -1404,6 +1404,25 @@ test_expect_failure 'unsetting the last key in a section removes header' '
1404
1405 cat >expect <<-\EOF &&
1406 # some generic comment on the configuration file itself
1407 + # a comment specific to this "section" section.
1408 + [section]
1409 + # some intervening lines
1410 + # that should also be dropped
1411 +
1412 + # please be careful when you update the above variable
1413 + EOF
1414 +
1415 + git config --unset section.key &&
1416 + test_cmp expect .git/config &&
1417 +
1418 + cat >.git/config <<-\EOF &&
1419 + [section]
1420 + key = value
1421 + [next-section]
1422 + EOF
1423 +
1424 + cat >expect <<-\EOF &&
1425 + [next-section]
1426 EOF
1427
1428 git config --unset section.key &&