{"thread":{"id":"60578","subject":"[Patch] test-lib-functions.sh : change test_i18ngrep to test_grep","startedAt":"2023-12-02T17:24:57Z","lastAt":"2023-12-18T18:56:05Z","messageCount":10,"participants":["Shreyansh Paliwal","Kousik Sanagavarapu","Junio C Hamano","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"485311","messageId":"CAPYXD64yCuMta_iGE+ZwgxrJn0U5shcwcB9jaiNkFhvff=R7MQ@mail.gmail.com","threadId":"60578","inReplyTo":null,"subject":"[Patch] test-lib-functions.sh : change test_i18ngrep to test_grep","fromName":"Shreyansh Paliwal","fromEmail":"shreyanshpaliwalcmsmn@gmail.com","sentAt":"2023-12-02T17:24:45Z","receivedAt":"2023-12-02T17:24:57Z","isPatch":true,"sender":{"key":"shreyanshpaliwalcmsmn@gmail.com","avatar":"https://avatars.githubusercontent.com/u/152720574?v=4"},"body":"Recently the test_i18ngrep was deprecated from the source code and\ntest_grep was implemented but in the test-lib-functions.sh file , in\nthe test_grep() function definition,\nit is written BUG \"too few parameters to test_i18ngrep\".\nSo the following patch solves the minor problem.\n\nSigned-off-by: Shreyansh Paliwal <Shreyanshpaliwalcmsmn@gmail.com>\n---\n t/test-lib-functions.sh | 2 +-\n 1 file changed, 1 insertions(+), 1 deletions(-)\n\n t/test-lib-functions.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)diff --git\na/t/test-lib-functions.sh b/t/test-lib-functions.sh\nindex 9c3cf12b26..8737c95e0c 100644\n--- a/t/test-lib-functions.sh\n--- a/t/test-lib-functions.sh\n+++ b/t/test-lib-functions.sh\n@@ -1277,7 +1277,7 @@ test_grep () {\n        if test $# -lt 2 ||\n           { test \"x!\" = \"x$1\" && test $# -lt 3 ; }\n        then\n-               BUG \"too few parameters to test_i18ngrep\"\n+               BUG \"too few parameters to test_grep\"\n        fi\n\n        if test \"x!\" = \"x$1\"\n--\n2.43\n"},{"id":"485331","messageId":"ZWw6r2EDGkpgyYEM@five231003","threadId":"60578","inReplyTo":"CAPYXD64yCuMta_iGE+ZwgxrJn0U5shcwcB9jaiNkFhvff=R7MQ@mail.gmail.com","subject":"Re: [Patch] test-lib-functions.sh : change test_i18ngrep to test_grep","fromName":"Kousik Sanagavarapu","fromEmail":"five231003@gmail.com","sentAt":"2023-12-03T08:22:07Z","receivedAt":"2023-12-03T08:22:12Z","isPatch":true,"sender":{"key":"five231003@gmail.com","avatar":"https://avatars.githubusercontent.com/u/75560439?v=4"},"body":"Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com> wrote:\n\n> Subject: [Patch] test-lib-functions.sh : change test_i18ngrep to test_grep\n\nFor anyone reading the subject, I think reading\n\n\tchange test_i18ngrep to test_grep\n\nwould be confusing, as from the looks of it, the patch does remove\ntest_i18ngrep() and replace it with test_grep (I mean the plan is to\nremove test_i18ngrep only after we are sure that it doesn't exist in the\ncode anywhere, anymore) but only making a change in the wording of an\nerror message within test_grep().\n\nAlso I think we can drop the SP after \"related topic\" part of the patch\nand the colon (but have the SP after the colon), that is\n\n\t\"test-lib-functions.sh: ...\"\n\nAlso, nit, but I think we should have [PATCH] instead of [Patch]. I'm not\nreally sure if Junio's setup treats [PATCH] and [Patch] to be same :)\n\n> Recently the test_i18ngrep was deprecated from the source code and\n> test_grep was implemented but in the test-lib-functions.sh file , in\n> the test_grep() function definition,\n\nThis recent deprecation was made in the commit,\n2e87fca189 (test framework: further deprecate test_i18ngrep, 2023-10-31)\nand it makes sense to include it in the commit message as the following\nchange is essentially something that the previous commit seems to have\nforgotten to do.\n\n> it is written BUG \"too few parameters to test_i18ngrep\".\n\nI think it is not necessary to mention what is the current code\nin _this case_ as it can be read in the change itself :)\n\n> So the following patch solves the minor problem.\n\nWhat exactly is the problem? I think it should be mentioned in the commit\nmessage that the wording of the error message causes confusion ;) as when\ntest_grep() is used in a test and this test fails. That the change is - it\nwould be clear to see\n\n\t\"too few parameters to test_grep\"\n\ninstead of\n\n\t\"too few parameters to test_i18ngrep\"\n\n> Signed-off-by: Shreyansh Paliwal <Shreyanshpaliwalcmsmn@gmail.com>\n> ---\n>  t/test-lib-functions.sh | 2 +-\n>  1 file changed, 1 insertions(+), 1 deletions(-)\n> \n>  t/test-lib-functions.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)diff --git\n> a/t/test-lib-functions.sh b/t/test-lib-functions.sh\n> index 9c3cf12b26..8737c95e0c 100644\n> --- a/t/test-lib-functions.sh\n> --- a/t/test-lib-functions.sh\n> +++ b/t/test-lib-functions.sh\n> @@ -1277,7 +1277,7 @@ test_grep () {\n>         if test $# -lt 2 ||\n>            { test \"x!\" = \"x$1\" && test $# -lt 3 ; }\n>         then\n> -               BUG \"too few parameters to test_i18ngrep\"\n> +               BUG \"too few parameters to test_grep\"\n>         fi\n> \n>         if test \"x!\" = \"x$1\"\n> --\n> 2.43\n\nThe diff format doesn't seem proper (some repeated lines and no newlines\nat the required places).\n\nIf you have no go-to tool to send patches through email then git-send-email\nis a really good tool to do it. It handles most of the work for you.\n\"MyFirstContribution\" has a guide to do so\n\n\thttps://git-send-email.io/ (also has setup with GMail)\n\thttps://git-scm.com/docs/MyFirstContribution#howto-git-send-email\n\nAnother good resource which is not linked often is\n\n\thttps://flusp.ime.usp.br/git/sending-patches-by-email-with-git/\n\nby Matheus Tavares, also a Git Contributor. It also has other useful links\nwhich are worth a read.\n\nThanks\n"},{"id":"485338","messageId":"xmqq34wj4e55.fsf@gitster.g","threadId":"60578","inReplyTo":"ZWw6r2EDGkpgyYEM@five231003","subject":"Re: [Patch] test-lib-functions.sh : change test_i18ngrep to test_grep","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-12-03T13:19:34Z","receivedAt":"2023-12-03T13:19:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kousik Sanagavarapu <five231003@gmail.com> writes:\n\n> Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com> wrote:\n>\n>> Subject: [Patch] test-lib-functions.sh : change test_i18ngrep to test_grep\n>\n> For anyone reading the subject, I think reading\n>\n> \tchange test_i18ngrep to test_grep\n>\n> would be confusing, as from the looks of it, the patch does remove\n> test_i18ngrep() and replace it with test_grep (I mean the plan is to\n> remove test_i18ngrep only after we are sure that it doesn't exist in the\n> code anywhere, anymore) but only making a change in the wording of an\n> error message within test_grep().\n\n;-)  \n\nYes, that was exactly my reaction to the subject (I'm on\nvacation so I only scanned the subject lines of incoming patches\nwithout looking at anything else and thought \"hmph, it is good\nsomebody else is cleaning up new uses of test_i18ngrep that have\nbeen introduced by topics simultaneously in flight\").\n"},{"id":"485345","messageId":"20231203171956.771-1-shreyanshpaliwalcmsmn@gmail.com","threadId":"60578","inReplyTo":"CAPYXD64yCuMta_iGE+ZwgxrJn0U5shcwcB9jaiNkFhvff=R7MQ@mail.gmail.com","subject":"[PATCH v2] test-lib-functions.sh: fix test_grep fail message wording","fromName":"Shreyansh Paliwal","fromEmail":"shreyanshpaliwalcmsmn@gmail.com","sentAt":"2023-12-03T17:17:59Z","receivedAt":"2023-12-03T17:20:23Z","isPatch":true,"sender":{"key":"shreyanshpaliwalcmsmn@gmail.com","avatar":"https://avatars.githubusercontent.com/u/152720574?v=4"},"body":"From: shreyp135 <shreyanshpaliwalcmsmn@gmail.com>\n\nIn the recent commit\n2e87fca189 (test framework: further deprecate test_i18ngrep, 2023-10-31),\nthe test_i18ngrep() function was deprecated.\n\nSo if a test employing this function fails,\nthe error messages may be confusing due to wording issues.\n\nIt's important to address these wording changes to ensure smooth transitions\nfor developers adapting to the deprecation of test_i18ngrep,\nand to maintain the effectiveness of the testing process.\n\nSigned-off-by: Shreyansh Paliwal <Shreyanshpaliwalcmsmn@gmail.com>\n---\n t/test-lib-functions.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh\nindex 9c3cf12b26..8737c95e0c 100644\n--- a/t/test-lib-functions.sh\n+++ b/t/test-lib-functions.sh\n@@ -1277,7 +1277,7 @@ test_grep () {\n \tif test $# -lt 2 ||\n \t   { test \"x!\" = \"x$1\" && test $# -lt 3 ; }\n \tthen\n-\t\tBUG \"too few parameters to test_i18ngrep\"\n+\t\tBUG \"too few parameters to test_grep\"\n \tfi\n \n \tif test \"x!\" = \"x$1\"\n-- \n2.43.0.1\n\n"},{"id":"485353","messageId":"ZW4d0M3X4MB6FpON@five231003","threadId":"60578","inReplyTo":"20231203171956.771-1-shreyanshpaliwalcmsmn@gmail.com","subject":"Re: [PATCH v2] test-lib-functions.sh: fix test_grep fail message wording","fromName":"Kousik Sanagavarapu","fromEmail":"five231003@gmail.com","sentAt":"2023-12-04T18:43:28Z","receivedAt":"2023-12-04T18:43:32Z","isPatch":true,"sender":{"key":"five231003@gmail.com","avatar":"https://avatars.githubusercontent.com/u/75560439?v=4"},"body":"On Sun, Dec 03, 2023 at 10:47:59PM +0530, Shreyansh Paliwal wrote:\n> From: shreyp135 <shreyanshpaliwalcmsmn@gmail.com>\n> \n> In the recent commit\n> 2e87fca189 (test framework: further deprecate test_i18ngrep, 2023-10-31),\n> the test_i18ngrep() function was deprecated.\n\ns/In the/In a\n\nis gramatically correct, but probably not worth a reroll.\n\n> So if a test employing this function fails,\n> the error messages may be confusing due to wording issues.\n\nIsn't the confusion due to test_i18ngrep being displayed in place of\ntest_grep and not the other way around? Because the formation of the\nsentence makes it look like the latter.\n\n> It's important to address these wording changes to ensure smooth transitions\n> for developers adapting to the deprecation of test_i18ngrep,\n> and to maintain the effectiveness of the testing process.\n> \n> Signed-off-by: Shreyansh Paliwal <Shreyanshpaliwalcmsmn@gmail.com>\n> ---\n>  t/test-lib-functions.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh\n> index 9c3cf12b26..8737c95e0c 100644\n> --- a/t/test-lib-functions.sh\n> +++ b/t/test-lib-functions.sh\n> @@ -1277,7 +1277,7 @@ test_grep () {\n>  \tif test $# -lt 2 ||\n>  \t   { test \"x!\" = \"x$1\" && test $# -lt 3 ; }\n>  \tthen\n> -\t\tBUG \"too few parameters to test_i18ngrep\"\n> +\t\tBUG \"too few parameters to test_grep\"\n>  \tfi\n>  \n>  \tif test \"x!\" = \"x$1\"\n> -- \n> 2.43.0.1\n\nRest looks good.\n\nHave a great time at the vacation Junio (and sorry for pinging in the\nfirst place... although this email will indirectly ping too :P).\n\nThanks\n"},{"id":"485758","messageId":"20231217153140.1831-1-shreyanshpaliwalcmsmn@gmail.com","threadId":"60578","inReplyTo":"20231203171956.771-1-shreyanshpaliwalcmsmn@gmail.com","subject":"Re: [PATCH v2] test-lib-functions.sh: fix test_grep fail message wording","fromName":"Shreyansh Paliwal","fromEmail":"shreyanshpaliwalcmsmn@gmail.com","sentAt":"2023-12-17T15:07:04Z","receivedAt":"2023-12-17T15:32:18Z","isPatch":true,"sender":{"key":"shreyanshpaliwalcmsmn@gmail.com","avatar":"https://avatars.githubusercontent.com/u/152720574?v=4"},"body":"From: shreyp135 <shreyanshpaliwalcmsmn@gmail.com>\n\nping.\n"},{"id":"485762","messageId":"CAPig+cSJ=RcJtYKzT0Kj1-0nJT0YxA=KPYV=5H80_inJYS_Vnw@mail.gmail.com","threadId":"60578","inReplyTo":"20231217153140.1831-1-shreyanshpaliwalcmsmn@gmail.com","subject":"Re: [PATCH v2] test-lib-functions.sh: fix test_grep fail message wording","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-12-18T00:51:23Z","receivedAt":"2023-12-18T00:51:35Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, Dec 17, 2023 at 10:32 AM Shreyansh Paliwal\n<shreyanshpaliwalcmsmn@gmail.com> wrote:\n> ping.\n\nJunio was on vacation at the time[1] that this patch was submitted, so\nit's quite possible that it simply got overlooked or he hasn't gotten\nthrough the backlog of emails which accumulated while he was away. So,\npinging is indeed the correct thing to do, and the patch is obviously\nan improvement, so hopefully it will be picked up soon.\n\n[1]: https://lore.kernel.org/git/xmqq34wj4e55.fsf@gitster.g/\n"},{"id":"485784","messageId":"xmqqjzpbh3kq.fsf@gitster.g","threadId":"60578","inReplyTo":"CAPig+cSJ=RcJtYKzT0Kj1-0nJT0YxA=KPYV=5H80_inJYS_Vnw@mail.gmail.com","subject":"Re: [PATCH v2] test-lib-functions.sh: fix test_grep fail message wording","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-12-18T16:34:45Z","receivedAt":"2023-12-18T16:34:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Sun, Dec 17, 2023 at 10:32 AM Shreyansh Paliwal\n> <shreyanshpaliwalcmsmn@gmail.com> wrote:\n>> ping.\n>\n> Junio was on vacation at the time[1] that this patch was submitted, so\n> it's quite possible that it simply got overlooked or he hasn't gotten\n> through the backlog of emails which accumulated while he was away.\n\nIt was dropped due to automated filter that noticed that the address\non its in-body From: line does not appear on any of its Signed-off-by:\nline ;-)\n\nI'll see if that is the only glitch in the patch (in which case I'll\nmanually adjust the authorship and apply) or respond on list\n(otherwise).\n\nThanks for pinging and ponging.\n\n> So,\n> pinging is indeed the correct thing to do, and the patch is obviously\n> an improvement, so hopefully it will be picked up soon.\n>\n> [1]: https://lore.kernel.org/git/xmqq34wj4e55.fsf@gitster.g/\n"},{"id":"485791","messageId":"xmqqh6kfe4am.fsf@gitster.g","threadId":"60578","inReplyTo":"xmqqjzpbh3kq.fsf@gitster.g","subject":"Re: [PATCH v2] test-lib-functions.sh: fix test_grep fail message wording","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-12-18T18:47:29Z","receivedAt":"2023-12-18T18:47:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I'll see if that is the only glitch in the patch (in which case I'll\n> manually adjust the authorship and apply) or respond on list\n> (otherwise).\n>\n> Thanks for pinging and ponging.\n\nHere is the version I queued.\nThanks, both.\n\n--- >8 ---\nFrom: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>\nDate: Sun, 3 Dec 2023 22:47:59 +0530\nSubject: [PATCH] test-lib-functions.sh: fix test_grep fail message wording\n\nIn the recent commit 2e87fca189 (test framework: further deprecate\ntest_i18ngrep, 2023-10-31), the test_i18ngrep function was\ndeprecated, and all the callers were updated to call the test_grep\nfunction instead.  But test_grep inherited an error message that\nstill refers to test_i18ngrep by mistake.  Correct it so that a\nbroken call to the test_grep will identify itself as such.\n\nSigned-off-by: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/test-lib-functions.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh\nindex c50bc18861..502f892fad 100644\n--- a/t/test-lib-functions.sh\n+++ b/t/test-lib-functions.sh\n@@ -1222,7 +1222,7 @@ test_grep () {\n \tif test $# -lt 2 ||\n \t   { test \"x!\" = \"x$1\" && test $# -lt 3 ; }\n \tthen\n-\t\tBUG \"too few parameters to test_i18ngrep\"\n+\t\tBUG \"too few parameters to test_grep\"\n \tfi\n \n \tif test \"x!\" = \"x$1\"\n-- \n2.43.0-76-g1a87c842ec\n\n"},{"id":"485792","messageId":"CAPig+cTXyfuuY17NmsfDO_5VpeMgXLpqf-Me8wtNs0nCgOW0jA@mail.gmail.com","threadId":"60578","inReplyTo":"xmqqh6kfe4am.fsf@gitster.g","subject":"Re: [PATCH v2] test-lib-functions.sh: fix test_grep fail message wording","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-12-18T18:55:53Z","receivedAt":"2023-12-18T18:56:05Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Dec 18, 2023 at 1:47 PM Junio C Hamano <gitster@pobox.com> wrote:\n> Here is the version I queued.\n>\n> --- >8 ---\n> From: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>\n> Date: Sun, 3 Dec 2023 22:47:59 +0530\n> Subject: [PATCH] test-lib-functions.sh: fix test_grep fail message wording\n>\n> In the recent commit 2e87fca189 (test framework: further deprecate\n> test_i18ngrep, 2023-10-31), the test_i18ngrep function was\n> deprecated, and all the callers were updated to call the test_grep\n> function instead.  But test_grep inherited an error message that\n> still refers to test_i18ngrep by mistake.  Correct it so that a\n> broken call to the test_grep will identify itself as such.\n\nThis rewritten commit message gets directly to the point without\nwasted words, making the purpose of the patch, and its justification,\neasier to understand on first read. Nicely done.\n\n> Signed-off-by: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n"}]}