{"thread":{"id":"46063","subject":"[PATCH] branch test: fix invalid config key access","startedAt":"2017-05-28T17:12:30Z","lastAt":"2017-05-29T01:13:42Z","messageCount":3,"participants":["Sahil Dua","Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"320896","messageId":"1495991536-71204-1-git-send-email-sahildua2305@gmail.com","threadId":"46063","inReplyTo":null,"subject":"[PATCH] branch test: fix invalid config key access","fromName":"Sahil Dua","fromEmail":"sahildua2305@gmail.com","sentAt":"2017-05-28T17:12:16Z","receivedAt":"2017-05-28T17:12:30Z","isPatch":true,"sender":{"key":"sahildua2305@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5206277?v=4"},"body":"Fixes the test by changing \"branch.s/s/dummy\" to \"branch.s/s.dummy\" which is\nthe right way of accessing config key \"branch.s/s.dummy\". Purpose of\nthis test is to confirm that this key doesn't exist after the branch\n\"s/s\" has been renamed to \"s\".\n\nEarlier it was trying to access invalid config key and hence was getting\nan error. However, this wasn't caught because we were expecting the\ncommand to fail for other reason as mentioned above.\n\nSigned-off-by: Sahil Dua <sahildua2305@gmail.com>\n---\n t/t3200-branch.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex fe62e7c..10f8f02 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -338,7 +338,7 @@ test_expect_success 'git branch -m s/s s should work when s/t is deleted' '\n \n test_expect_success 'config information was renamed, too' '\n \ttest $(git config branch.s.dummy) = Hello &&\n-\ttest_must_fail git config branch.s/s/dummy\n+\ttest_must_fail git config branch.s/s.dummy\n '\n \n test_expect_success 'deleting a symref' '\n-- \n2.7.4 (Apple Git-66)\n\n"},{"id":"320897","messageId":"CACBZZX7J4xjw0ThSrQ-kG+KGiePZ-8vXET4cHEBOUFL8ydwE9A@mail.gmail.com","threadId":"46063","inReplyTo":"1495991536-71204-1-git-send-email-sahildua2305@gmail.com","subject":"Re: [PATCH] branch test: fix invalid config key access","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-05-28T17:33:11Z","receivedAt":"2017-05-28T17:33:38Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sun, May 28, 2017 at 7:12 PM, Sahil Dua <sahildua2305@gmail.com> wrote:\n> Fixes the test by changing \"branch.s/s/dummy\" to \"branch.s/s.dummy\" which is\n> the right way of accessing config key \"branch.s/s.dummy\". Purpose of\n> this test is to confirm that this key doesn't exist after the branch\n> \"s/s\" has been renamed to \"s\".\n>\n> Earlier it was trying to access invalid config key and hence was getting\n> an error. However, this wasn't caught because we were expecting the\n> command to fail for other reason as mentioned above.\n\nLooks obviously correct to me. Added by Johannes in commit dc81c58cd6\n(\"git-branch: rename config vars branch.<branch>.*, too\", 2006-12-16),\nCC-ing him in case he has anything to say about it, but just looks\nlike a typo back in 2006.\n\n> Signed-off-by: Sahil Dua <sahildua2305@gmail.com>\n> ---\n>  t/t3200-branch.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\n> index fe62e7c..10f8f02 100755\n> --- a/t/t3200-branch.sh\n> +++ b/t/t3200-branch.sh\n> @@ -338,7 +338,7 @@ test_expect_success 'git branch -m s/s s should work when s/t is deleted' '\n>\n>  test_expect_success 'config information was renamed, too' '\n>         test $(git config branch.s.dummy) = Hello &&\n> -       test_must_fail git config branch.s/s/dummy\n> +       test_must_fail git config branch.s/s.dummy\n>  '\n>\n>  test_expect_success 'deleting a symref' '\n> --\n> 2.7.4 (Apple Git-66)\n>\n"},{"id":"320916","messageId":"xmqqzidw8ny7.fsf@gitster.mtv.corp.google.com","threadId":"46063","inReplyTo":"CACBZZX7J4xjw0ThSrQ-kG+KGiePZ-8vXET4cHEBOUFL8ydwE9A@mail.gmail.com","subject":"Re: [PATCH] branch test: fix invalid config key access","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-05-29T01:13:36Z","receivedAt":"2017-05-29T01:13:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> On Sun, May 28, 2017 at 7:12 PM, Sahil Dua <sahildua2305@gmail.com> wrote:\n>> Fixes the test by changing \"branch.s/s/dummy\" to \"branch.s/s.dummy\" which is\n>> the right way of accessing config key \"branch.s/s.dummy\". Purpose of\n>> this test is to confirm that this key doesn't exist after the branch\n>> \"s/s\" has been renamed to \"s\".\n>>\n>> Earlier it was trying to access invalid config key and hence was getting\n>> an error. However, this wasn't caught because we were expecting the\n>> command to fail for other reason as mentioned above.\n>\n> Looks obviously correct to me. Added by Johannes in commit dc81c58cd6\n> (\"git-branch: rename config vars branch.<branch>.*, too\", 2006-12-16),\n> CC-ing him in case he has anything to say about it, but just looks\n> like a typo back in 2006.\n\nYeah, it does look like a simple typo.  Sorry for not spotting it\nback then.\n\n\n>> Signed-off-by: Sahil Dua <sahildua2305@gmail.com>\n>> ---\n>>  t/t3200-branch.sh | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\n>> index fe62e7c..10f8f02 100755\n>> --- a/t/t3200-branch.sh\n>> +++ b/t/t3200-branch.sh\n>> @@ -338,7 +338,7 @@ test_expect_success 'git branch -m s/s s should work when s/t is deleted' '\n>>\n>>  test_expect_success 'config information was renamed, too' '\n>>         test $(git config branch.s.dummy) = Hello &&\n>> -       test_must_fail git config branch.s/s/dummy\n>> +       test_must_fail git config branch.s/s.dummy\n>>  '\n>>\n>>  test_expect_success 'deleting a symref' '\n>> --\n>> 2.7.4 (Apple Git-66)\n>>\n"}]}