{"thread":{"id":"40259","subject":"[PATCH v1] t9821: use test_config","startedAt":"2015-09-03T09:34:46Z","lastAt":"2015-09-03T16:52:23Z","messageCount":5,"participants":["larsxschneider@gmail.com","Eric Sunshine","Lars Schneider","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"269303","messageId":"1441272887-72633-1-git-send-email-larsxschneider@gmail.com","threadId":"40259","inReplyTo":null,"subject":"[PATCH v1] t9821: use test_config","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2015-09-03T09:34:46Z","receivedAt":"2015-09-03T09:34:46Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nThanks Remi for pointing out test_config to me!\n\nCheers,\nLars\n\nLars Schneider (1):\n  t9821: use test_config\n\n t/t9821-git-p4-path-variations.sh | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\n--\n1.9.5 (Apple Git-50.3)\n"},{"id":"269302","messageId":"1441272887-72633-2-git-send-email-larsxschneider@gmail.com","threadId":"40259","inReplyTo":"1441272887-72633-1-git-send-email-larsxschneider@gmail.com","subject":"[PATCH v1] t9821: use test_config","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2015-09-03T09:34:47Z","receivedAt":"2015-09-03T09:34:47Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nSigned-off-by: Lars Schneider <larsxschneider@gmail.com>\n---\n t/t9821-git-p4-path-variations.sh | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh\nindex 81e46ac..5a26fec 100755\n--- a/t/t9821-git-p4-path-variations.sh\n+++ b/t/t9821-git-p4-path-variations.sh\n@@ -45,7 +45,7 @@ test_expect_success 'Clone root' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit init . &&\n-\t\tgit config core.ignorecase false &&\n+\t\ttest_config core.ignorecase false &&\n \t\tgit p4 clone --use-client-spec --destination=\"$git\" //depot &&\n \t\t# This method is used instead of \"test -f\" to ensure the case is\n \t\t# checked even if the test is executed on case-insensitive file systems.\n@@ -67,7 +67,7 @@ test_expect_success 'Clone root (ignorecase)' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit init . &&\n-\t\tgit config core.ignorecase true &&\n+\t\ttest_config core.ignorecase true &&\n \t\tgit p4 clone --use-client-spec --destination=\"$git\" //depot &&\n \t\t# This method is used instead of \"test -f\" to ensure the case is\n \t\t# checked even if the test is executed on case-insensitive file systems.\n@@ -91,7 +91,7 @@ test_expect_success 'Clone root and ignore one file' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit init . &&\n-\t\tgit config core.ignorecase false &&\n+\t\ttest_config core.ignorecase false &&\n \t\tgit p4 clone --use-client-spec --destination=\"$git\" //depot &&\n \t\t# We ignore one file in the client spec and all path cases change from\n \t\t# \"TO\" to \"to\"!\n@@ -113,7 +113,7 @@ test_expect_success 'Clone root and ignore one file (ignorecase)' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit init . &&\n-\t\tgit config core.ignorecase true &&\n+\t\ttest_config core.ignorecase true &&\n \t\tgit p4 clone --use-client-spec --destination=\"$git\" //depot &&\n \t\t# We ignore one file in the client spec and all path cases change from\n \t\t# \"TO\" to \"to\"!\n@@ -133,7 +133,7 @@ test_expect_success 'Clone path' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit init . &&\n-\t\tgit config core.ignorecase false &&\n+\t\ttest_config core.ignorecase false &&\n \t\tgit p4 clone --use-client-spec --destination=\"$git\" //depot &&\n \t\tcat >expect <<-\\EOF &&\n \t\tto/File2.txt\n@@ -149,7 +149,7 @@ test_expect_success 'Clone path (ignorecase)' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit init . &&\n-\t\tgit config core.ignorecase true &&\n+\t\ttest_config core.ignorecase true &&\n \t\tgit p4 clone --use-client-spec --destination=\"$git\" //depot &&\n \t\tcat >expect <<-\\EOF &&\n \t\tTO/File2.txt\n@@ -180,7 +180,7 @@ test_expect_success 'Add a new file and clone path with new file (ignorecase)' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit init . &&\n-\t\tgit config core.ignorecase true &&\n+\t\ttest_config core.ignorecase true &&\n \t\tgit p4 clone --use-client-spec --destination=\"$git\" //depot &&\n \t\tcat >expect <<-\\EOF &&\n \t\tto/File0.txt\n--\n1.9.5 (Apple Git-50.3)\n"},{"id":"269311","messageId":"CAPig+cTzeUKiFVvdsGBvvUg+9qOw6RWHdzuTgQRTWm5w0CeRcQ@mail.gmail.com","threadId":"40259","inReplyTo":"1441272887-72633-2-git-send-email-larsxschneider@gmail.com","subject":"Re: [PATCH v1] t9821: use test_config","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-09-03T13:04:19Z","receivedAt":"2015-09-03T13:04:19Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Sep 3, 2015 at 5:34 AM,  <larsxschneider@gmail.com> wrote:\n> From: Lars Schneider <larsxschneider@gmail.com>\n>\n> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n> ---\n> diff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh\n> index 81e46ac..5a26fec 100755\n> --- a/t/t9821-git-p4-path-variations.sh\n> +++ b/t/t9821-git-p4-path-variations.sh\n> @@ -45,7 +45,7 @@ test_expect_success 'Clone root' '\n>         (\n>                 cd \"$git\" &&\n>                 git init . &&\n> -               git config core.ignorecase false &&\n> +               test_config core.ignorecase false &&\n\ntest_config ensures that the config setting gets \"unset\" at the end of\nthe test, whether the test succeeds or not, so that subsequent tests\nare not affected by the setting. However, in this case, since the $git\nrepository gets recreated from scratch for each test anyhow, use of\ntest_config is superfluous. In fact, it may be slightly\ncontraindicated since it could mislead the reader into thinking that\nstate is carried over from test to test. (Not a big objections, but\nsomething to take into consideration.)\n\n>                 git p4 clone --use-client-spec --destination=\"$git\" //depot &&\n>                 # This method is used instead of \"test -f\" to ensure the case is\n>                 # checked even if the test is executed on case-insensitive file systems.\n> @@ -67,7 +67,7 @@ test_expect_success 'Clone root (ignorecase)' '\n>         (\n>                 cd \"$git\" &&\n>                 git init . &&\n> -               git config core.ignorecase true &&\n> +               test_config core.ignorecase true &&\n>                 git p4 clone --use-client-spec --destination=\"$git\" //depot &&\n>                 # This method is used instead of \"test -f\" to ensure the case is\n>                 # checked even if the test is executed on case-insensitive file systems.\n> @@ -91,7 +91,7 @@ test_expect_success 'Clone root and ignore one file' '\n>         (\n>                 cd \"$git\" &&\n>                 git init . &&\n> -               git config core.ignorecase false &&\n> +               test_config core.ignorecase false &&\n>                 git p4 clone --use-client-spec --destination=\"$git\" //depot &&\n>                 # We ignore one file in the client spec and all path cases change from\n>                 # \"TO\" to \"to\"!\n> @@ -113,7 +113,7 @@ test_expect_success 'Clone root and ignore one file (ignorecase)' '\n>         (\n>                 cd \"$git\" &&\n>                 git init . &&\n> -               git config core.ignorecase true &&\n> +               test_config core.ignorecase true &&\n>                 git p4 clone --use-client-spec --destination=\"$git\" //depot &&\n>                 # We ignore one file in the client spec and all path cases change from\n>                 # \"TO\" to \"to\"!\n> @@ -133,7 +133,7 @@ test_expect_success 'Clone path' '\n>         (\n>                 cd \"$git\" &&\n>                 git init . &&\n> -               git config core.ignorecase false &&\n> +               test_config core.ignorecase false &&\n>                 git p4 clone --use-client-spec --destination=\"$git\" //depot &&\n>                 cat >expect <<-\\EOF &&\n>                 to/File2.txt\n> @@ -149,7 +149,7 @@ test_expect_success 'Clone path (ignorecase)' '\n>         (\n>                 cd \"$git\" &&\n>                 git init . &&\n> -               git config core.ignorecase true &&\n> +               test_config core.ignorecase true &&\n>                 git p4 clone --use-client-spec --destination=\"$git\" //depot &&\n>                 cat >expect <<-\\EOF &&\n>                 TO/File2.txt\n> @@ -180,7 +180,7 @@ test_expect_success 'Add a new file and clone path with new file (ignorecase)' '\n>         (\n>                 cd \"$git\" &&\n>                 git init . &&\n> -               git config core.ignorecase true &&\n> +               test_config core.ignorecase true &&\n>                 git p4 clone --use-client-spec --destination=\"$git\" //depot &&\n>                 cat >expect <<-\\EOF &&\n>                 to/File0.txt\n> --\n> 1.9.5 (Apple Git-50.3)\n"},{"id":"269323","messageId":"1C0CF9F4-29EA-4EE0-9DD1-071D57BCFD8B@gmail.com","threadId":"40259","inReplyTo":"CAPig+cTzeUKiFVvdsGBvvUg+9qOw6RWHdzuTgQRTWm5w0CeRcQ@mail.gmail.com","subject":"Re: [PATCH v1] t9821: use test_config","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2015-09-03T15:13:54Z","receivedAt":"2015-09-03T15:13:54Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\nOn 03 Sep 2015, at 15:04, Eric Sunshine <sunshine@sunshineco.com> wrote:\n\n> On Thu, Sep 3, 2015 at 5:34 AM,  <larsxschneider@gmail.com> wrote:\n>> From: Lars Schneider <larsxschneider@gmail.com>\n>> \n>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n>> ---\n>> diff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh\n>> index 81e46ac..5a26fec 100755\n>> --- a/t/t9821-git-p4-path-variations.sh\n>> +++ b/t/t9821-git-p4-path-variations.sh\n>> @@ -45,7 +45,7 @@ test_expect_success 'Clone root' '\n>>        (\n>>                cd \"$git\" &&\n>>                git init . &&\n>> -               git config core.ignorecase false &&\n>> +               test_config core.ignorecase false &&\n> \n> test_config ensures that the config setting gets \"unset\" at the end of\n> the test, whether the test succeeds or not, so that subsequent tests\n> are not affected by the setting. However, in this case, since the $git\n> repository gets recreated from scratch for each test anyhow, use of\n> test_config is superfluous. In fact, it may be slightly\n> contraindicated since it could mislead the reader into thinking that\n> state is carried over from test to test. (Not a big objections, but\n> something to take into consideration.)\nOK. Do I need to do anything to take the PATCH suggestion back?\nI thanks for the explanation!\n\nCheers,\nLars\n"},{"id":"269340","messageId":"xmqqfv2vla2g.fsf@gitster.mtv.corp.google.com","threadId":"40259","inReplyTo":"1C0CF9F4-29EA-4EE0-9DD1-071D57BCFD8B@gmail.com","subject":"Re: [PATCH v1] t9821: use test_config","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-09-03T16:52:23Z","receivedAt":"2015-09-03T16:52:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Lars Schneider <larsxschneider@gmail.com> writes:\n\n> On 03 Sep 2015, at 15:04, Eric Sunshine <sunshine@sunshineco.com> wrote:\n>\n>> On Thu, Sep 3, 2015 at 5:34 AM,  <larsxschneider@gmail.com> wrote:\n>>> From: Lars Schneider <larsxschneider@gmail.com>\n>>> \n>>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n>>> ---\n>>> diff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh\n>>> index 81e46ac..5a26fec 100755\n>>> --- a/t/t9821-git-p4-path-variations.sh\n>>> +++ b/t/t9821-git-p4-path-variations.sh\n>>> @@ -45,7 +45,7 @@ test_expect_success 'Clone root' '\n>>>        (\n>>>                cd \"$git\" &&\n>>>                git init . &&\n>>> -               git config core.ignorecase false &&\n>>> +               test_config core.ignorecase false &&\n>> \n>> test_config ensures that the config setting gets \"unset\" at the end of\n>> the test, whether the test succeeds or not, so that subsequent tests\n>> are not affected by the setting. However, in this case, since the $git\n>> repository gets recreated from scratch for each test anyhow, use of\n>> test_config is superfluous. In fact, it may be slightly\n>> contraindicated since it could mislead the reader into thinking that\n>> state is carried over from test to test. (Not a big objections, but\n>> something to take into consideration.)\n> OK. Do I need to do anything to take the PATCH suggestion back?\n\nYou can just say \"I retract this one because...\", which you just\ndid.\n\nFor the path-encoding patch, I think the following is all that is\nnecessary to be squashed in, but please double check (unless you\nhave some other improvements you want to make on top of v6 of that\npatch, no need to reroll only for the following).\n\nThanks.\n\n\n t/t9822-git-p4-path-encoding.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh\nindex e507ad7..3646580 100755\n--- a/t/t9822-git-p4-path-encoding.sh\n+++ b/t/t9822-git-p4-path-encoding.sh\n@@ -39,7 +39,7 @@ test_expect_success 'Clone repo containing iso8859-1 encoded paths with git-p4.p\n \t(\n \t\tcd \"$git\" &&\n \t\tgit init . &&\n-\t\ttest_config git-p4.pathEncoding iso8859-1 &&\n+\t\tgit config git-p4.pathEncoding iso8859-1 &&\n \t\tgit p4 clone --use-client-spec --destination=\"$git\" //depot &&\n \t\tUTF8=\"$(printf \"$UTF8_ESCAPED\")\" &&\n \t\techo $UTF8 >expect &&\n"}]}