{"thread":{"id":"34608","subject":"[PATCH] Add missing test file for UTF-16.","startedAt":"2013-08-03T17:26:31Z","lastAt":"2013-08-06T17:24:20Z","messageCount":6,"participants":["brian m. carlson","Duy Nguyen","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"224538","messageId":"1375550791-5823-1-git-send-email-sandals@crustytoothpaste.net","threadId":"34608","inReplyTo":null,"subject":"[PATCH] Add missing test file for UTF-16.","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2013-08-03T17:26:31Z","receivedAt":"2013-08-03T17:26:31Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"The test file that the UTF-16 rejection test looks for is missing, but this went\nunnoticed because the test is expected to fail anyway; as a consequence, the\ntest fails because the file containing the commit message is missing, and not\nbecause the test file contains a NUL byte.  Fix this by including a sample text\nfile containing a commit message encoded in UTF-16.\n---\n t/t3900/UTF-16.txt | Bin 0 -> 146 bytes\n 1 file changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 t/t3900/UTF-16.txt\n\ndiff --git a/t/t3900/UTF-16.txt b/t/t3900/UTF-16.txt\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..2257f05a992a4b9500f6ff33752cbdf8fb58c99d\nGIT binary patch\nliteral 146\nzcmW-aJqm<C6obFoQ_KYvZ0uz~uwFfY_=AGZf}@2;@>bjKEzFY?FCi}po-doQaNvlX\nzuj<&j$Vh~SS#Fd&>8^}o3xQtzWRNy5zCGpzu|P`62Tv_HZgu?B*(r7K7qg7DI9e@K\nJ`p+qB@d1eo8QA~;\n\nliteral 0\nHcmV?d00001\n\n-- \n1.8.4.rc1\n"},{"id":"224546","messageId":"CACsJy8CT3uxp99n9VUXDbL30WEDcuRreeJBaqBcx9Ujici67VA@mail.gmail.com","threadId":"34608","inReplyTo":"1375550791-5823-1-git-send-email-sandals@crustytoothpaste.net","subject":"Re: [PATCH] Add missing test file for UTF-16.","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2013-08-04T02:31:01Z","receivedAt":"2013-08-04T02:31:01Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sun, Aug 4, 2013 at 12:26 AM, brian m. carlson\n<sandals@crustytoothpaste.net> wrote:\n> The test file that the UTF-16 rejection test looks for is missing, but this went\n> unnoticed because the test is expected to fail anyway; as a consequence, the\n> test fails because the file containing the commit message is missing, and not\n> because the test file contains a NUL byte.  Fix this by including a sample text\n> file containing a commit message encoded in UTF-16.\n\nTested-by: Duy Nguyen <pclouds@gmai.com>\n\nand sorry, my bad. I think we need your sign-off in this patch.\n\n> ---\n>  t/t3900/UTF-16.txt | Bin 0 -> 146 bytes\n>  1 file changed, 0 insertions(+), 0 deletions(-)\n>  create mode 100644 t/t3900/UTF-16.txt\n>\n> diff --git a/t/t3900/UTF-16.txt b/t/t3900/UTF-16.txt\n> new file mode 100644\n> index 0000000000000000000000000000000000000000..2257f05a992a4b9500f6ff33752cbdf8fb58c99d\n> GIT binary patch\n> literal 146\n> zcmW-aJqm<C6obFoQ_KYvZ0uz~uwFfY_=AGZf}@2;@>bjKEzFY?FCi}po-doQaNvlX\n> zuj<&j$Vh~SS#Fd&>8^}o3xQtzWRNy5zCGpzu|P`62Tv_HZgu?B*(r7K7qg7DI9e@K\n> J`p+qB@d1eo8QA~;\n>\n> literal 0\n> HcmV?d00001\n>\n> --\n> 1.8.4.rc1\n>\n-- \nDuy\n"},{"id":"224559","messageId":"20130804160617.GA4560@vauxhall.crustytoothpaste.net","threadId":"34608","inReplyTo":"CACsJy8CT3uxp99n9VUXDbL30WEDcuRreeJBaqBcx9Ujici67VA@mail.gmail.com","subject":"Re: [PATCH] Add missing test file for UTF-16.","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2013-08-04T16:06:17Z","receivedAt":"2013-08-04T16:06:17Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Sun, Aug 04, 2013 at 09:31:01AM +0700, Duy Nguyen wrote:\n> Tested-by: Duy Nguyen <pclouds@gmai.com>\n\nI think you're missing an \"l\" in the domain name there.\n\n> and sorry, my bad. I think we need your sign-off in this patch.\n\nI just ran across it because I'm going through all the TODO tests and\nseeing which ones I can fix, and I generally just CC the last three or\nfour people who touched the files in question.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\n+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187\n"},{"id":"224603","messageId":"7vtxj4kry1.fsf@alter.siamese.dyndns.org","threadId":"34608","inReplyTo":"CACsJy8CT3uxp99n9VUXDbL30WEDcuRreeJBaqBcx9Ujici67VA@mail.gmail.com","subject":"Re: [PATCH] Add missing test file for UTF-16.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-08-05T16:44:54Z","receivedAt":"2013-08-05T16:44:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Duy Nguyen <pclouds@gmail.com> writes:\n\n> On Sun, Aug 4, 2013 at 12:26 AM, brian m. carlson\n> <sandals@crustytoothpaste.net> wrote:\n>> The test file that the UTF-16 rejection test looks for is missing, but this went\n>> unnoticed because the test is expected to fail anyway; as a consequence, the\n>> test fails because the file containing the commit message is missing, and not\n>> because the test file contains a NUL byte.  Fix this by including a sample text\n>> file containing a commit message encoded in UTF-16.\n>\n> Tested-by: Duy Nguyen <pclouds@gmai.com>\n>\n> and sorry, my bad. I think we need your sign-off in this patch.\n\nI think 37576c14 (commit_tree(): refuse commit messages that contain\nNULs, 2011-12-15) that marked this test with \"test_expect_failure\" is\nbroken with or without this fix.  It should be more like so:\n\ndiff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh\nindex 37ddabb..5e72d72 100755\n--- a/t/t3900-i18n-commit.sh\n+++ b/t/t3900-i18n-commit.sh\n@@ -34,9 +34,9 @@ test_expect_success 'no encoding header for base case' '\n \ttest z = \"z$E\"\n '\n \n-test_expect_failure 'UTF-16 refused because of NULs' '\n+test_expect_success 'UTF-16 refused because of NULs' '\n \techo UTF-16 >F &&\n-\tgit commit -a -F \"$TEST_DIRECTORY\"/t3900/UTF-16.txt\n+\ttest_must_fail git commit -a -F \"$TEST_DIRECTORY\"/t3900/UTF-16.txt\n '\n \n \n"},{"id":"224660","messageId":"CACsJy8ACqB5qRLFCerACEQrK8QXH+n=tAxdutAGT6JeijDvJUQ@mail.gmail.com","threadId":"34608","inReplyTo":"7vtxj4kry1.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Add missing test file for UTF-16.","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2013-08-06T11:59:10Z","receivedAt":"2013-08-06T11:59:10Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Aug 5, 2013 at 11:44 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Duy Nguyen <pclouds@gmail.com> writes:\n>\n>> On Sun, Aug 4, 2013 at 12:26 AM, brian m. carlson\n>> <sandals@crustytoothpaste.net> wrote:\n>>> The test file that the UTF-16 rejection test looks for is missing, but this went\n>>> unnoticed because the test is expected to fail anyway; as a consequence, the\n>>> test fails because the file containing the commit message is missing, and not\n>>> because the test file contains a NUL byte.  Fix this by including a sample text\n>>> file containing a commit message encoded in UTF-16.\n>>\n>> Tested-by: Duy Nguyen <pclouds@gmai.com>\n>>\n>> and sorry, my bad. I think we need your sign-off in this patch.\n>\n> I think 37576c14 (commit_tree(): refuse commit messages that contain\n> NULs, 2011-12-15) that marked this test with \"test_expect_failure\" is\n> broken with or without this fix.  It should be more like so:\n>\n> diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh\n> index 37ddabb..5e72d72 100755\n> --- a/t/t3900-i18n-commit.sh\n> +++ b/t/t3900-i18n-commit.sh\n> @@ -34,9 +34,9 @@ test_expect_success 'no encoding header for base case' '\n>         test z = \"z$E\"\n>  '\n>\n> -test_expect_failure 'UTF-16 refused because of NULs' '\n> +test_expect_success 'UTF-16 refused because of NULs' '\n>         echo UTF-16 >F &&\n> -       git commit -a -F \"$TEST_DIRECTORY\"/t3900/UTF-16.txt\n> +       test_must_fail git commit -a -F \"$TEST_DIRECTORY\"/t3900/UTF-16.txt\n>  '\n\nThe intention was \"UTF-16 is not supported yet but we want to\". But I\ndon't think we (at least I) will put any effort on that front to allow\nNUL in commit message, so the patch, as in \"we do not support UTF-16\",\nis fine.\n-- \nDuy\n"},{"id":"224690","messageId":"7veha6hgvv.fsf@alter.siamese.dyndns.org","threadId":"34608","inReplyTo":"CACsJy8ACqB5qRLFCerACEQrK8QXH+n=tAxdutAGT6JeijDvJUQ@mail.gmail.com","subject":"Re: [PATCH] Add missing test file for UTF-16.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-08-06T17:24:20Z","receivedAt":"2013-08-06T17:24:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Duy Nguyen <pclouds@gmail.com> writes:\n\n> The intention was \"UTF-16 is not supported yet but we want to\". But I\n> don't think we (at least I) will put any effort on that front to allow\n> NUL in commit message, so the patch, as in \"we do not support UTF-16\",\n> is fine.\n\nAgreed.  Here is what I queued.\n\n-- >8 --\nSubject: [PATCH] t3900: test rejecting log message with NULs correctly\n\nIt is not like that our longer term desire is to someday start\naccepting log messages with NULs in them, so it is wrong to mark a test\nthat demonstrates \"git commit\" that correctly fails given such an\ninput as \"expect-failure\".  \"git commit\" should fail today, and it\nshould fail the same way in the future given a message with NUL in it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t3900-i18n-commit.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh\nindex d48a7c0..a9e5662 100755\n--- a/t/t3900-i18n-commit.sh\n+++ b/t/t3900-i18n-commit.sh\n@@ -34,9 +34,9 @@ test_expect_success 'no encoding header for base case' '\n \ttest z = \"z$E\"\n '\n \n-test_expect_failure 'UTF-16 refused because of NULs' '\n+test_expect_success 'UTF-16 refused because of NULs' '\n \techo UTF-16 >F &&\n-\tgit commit -a -F \"$TEST_DIRECTORY\"/t3900/UTF-16.txt\n+\ttest_must_fail git commit -a -F \"$TEST_DIRECTORY\"/t3900/UTF-16.txt\n '\n \n \n"}]}