{"thread":{"id":"51900","subject":"[PATCH 0/2] t0028 fix test + more tests","startedAt":"2019-09-23T08:33:26Z","lastAt":"2019-09-30T07:29:45Z","messageCount":18,"participants":["Alexandr Miloslavskiy via GitGitGadget","Torsten Bögershausen","Johannes Sixt","Alexandr Miloslavskiy","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"382750","messageId":"pull.347.git.gitgitgadget@gmail.com","threadId":"51900","inReplyTo":null,"subject":"[PATCH 0/2] t0028 fix test + more tests","fromName":"Alexandr Miloslavskiy via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-09-23T08:33:22Z","receivedAt":"2019-09-23T08:33:26Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"Commit 1/2: t0028: fix test for UTF-16-LE-BOM Commit 2/2: t0028: add more\ntests Please refer to individual commit messages for more information.\n\nAlexandr Miloslavskiy (2):\n  t0028: fix test for UTF-16-LE-BOM\n  t0028: add more tests\n\n t/t0028-working-tree-encoding.sh | 41 +++++++++++++++++++++++++++++++-\n 1 file changed, 40 insertions(+), 1 deletion(-)\n\n\nbase-commit: 4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-347%2FSyntevoAlex%2F%230189_t0028_fixes-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-347/SyntevoAlex/#0189_t0028_fixes-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/347\n-- \ngitgitgadget\n"},{"id":"382751","messageId":"fe850a8cd597e48bf023f7a3b025fe497f9d6153.1569227601.git.gitgitgadget@gmail.com","threadId":"51900","inReplyTo":"pull.347.git.gitgitgadget@gmail.com","subject":"[PATCH 1/2] t0028: fix test for UTF-16-LE-BOM","fromName":"Alexandr Miloslavskiy via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-09-23T08:33:22Z","receivedAt":"2019-09-23T08:33:27Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n\nAccording to its name, the test its designed for UTF-16-LE-BOM.\nHowever, possibly due to copy&paste oversight, it was using UTF-32 file.\n\nWhile the test succeeds (probably interprets extra \\x00\\x00 as embedded\nzero), I myself had an unrelated problem which caused the test to fail.\nWhen analyzing the \tfailure I was quite puzzled by the fact that the\ntest is obviously bugged. And it seems that I'm not alone:\nhttps://public-inbox.org/git/CAH8yC8kSakS807d4jc_BtcUJOrcVT4No37AXSz=jePxhw-o9Dg@mail.gmail.com/T/#u\n\nThis fix changes the test to follow its original intention.\n\nSigned-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n---\n t/t0028-working-tree-encoding.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex 1090e650ed..5493cf3ca9 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -40,7 +40,7 @@ test_expect_success 'setup test files' '\n \tprintf \"$text\" | write_utf16 >test.utf16.raw &&\n \tprintf \"$text\" | write_utf32 >test.utf32.raw &&\n \tprintf \"\\377\\376\"                         >test.utf16lebom.raw &&\n-\tprintf \"$text\" | iconv -f UTF-8 -t UTF-32LE >>test.utf16lebom.raw &&\n+\tprintf \"$text\" | iconv -f UTF-8 -t UTF-16LE >>test.utf16lebom.raw &&\n \n \t# Line ending tests\n \tprintf \"one\\ntwo\\nthree\\n\" >lf.utf8.raw &&\n-- \ngitgitgadget\n\n"},{"id":"382752","messageId":"d5f6f00a516180d9ae4a0ed1cceecec8ef1b6b88.1569227601.git.gitgitgadget@gmail.com","threadId":"51900","inReplyTo":"pull.347.git.gitgitgadget@gmail.com","subject":"[PATCH 2/2] t0028: add more tests","fromName":"Alexandr Miloslavskiy via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-09-23T08:33:23Z","receivedAt":"2019-09-23T08:33:28Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n\nAfter I discovered that UTF-16-LE-BOM test was bugged and still\nsucceeded, I decided that better tests are required. Possibly the best\noption here is to compare git results against hardcoded ground truth.\n\nThe new tests also cover more interesting chars where (ANSI != UTF-8).\n\nSigned-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n---\n t/t0028-working-tree-encoding.sh | 39 ++++++++++++++++++++++++++++++++\n 1 file changed, 39 insertions(+)\n\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex 5493cf3ca9..d0dd5dd0ea 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -280,4 +280,43 @@ test_expect_success ICONV_SHIFT_JIS 'check roundtrip encoding' '\n \tgit reset\n '\n \n+# $1: checkout encoding\n+# $2: test string\n+# $3: binary test string in checkout encoding\n+test_commit_utf8_checkout_other () {\n+\tencoding=\"$1\"\n+\torig_string=\"$2\"\n+\texpect_bytes=\"$3\"\n+\t\n+\ttest_expect_success \"Commit utf-8, checkout ${encoding}\" '\n+\t\ttest_when_finished \"git checkout HEAD -- .gitattributes\" &&\n+\t\t\n+\t\ttest_ext=\"commit_utf8_checkout_${encoding}\" &&\n+\t\ttest_file=\"test.${test_ext}\" &&\n+\t\t\n+\t\t# Commit as utf-8\n+\t\techo \"*.${test_ext} text working-tree-encoding=utf-8\" >.gitattributes &&\n+\t\tprintf \"${orig_string}\" >\"${test_file}\" &&\n+\t\tgit add \"${test_file}\" &&\n+\t\tgit commit -m \"Test data\" &&\n+\n+\t\t# Checkout in tested encoding\n+\t\trm \"${test_file}\" &&\n+\t\techo \"*.${test_ext} text working-tree-encoding=${encoding}\" >.gitattributes &&\n+\t\tgit checkout HEAD -- \"${test_file}\" &&\n+\t\t\n+\t\t# Test\n+\t\tprintf \"${expect_bytes}\" > \"${test_file}.raw\" &&\n+\t\ttest_cmp_bin \"${test_file}.raw\" \"${test_file}\"\n+\t'\n+}\n+\n+test_commit_utf8_checkout_other \"UTF-8\"        \"Test Тест\" \"\\124\\145\\163\\164\\040\\320\\242\\320\\265\\321\\201\\321\\202\"\n+test_commit_utf8_checkout_other \"UTF-16LE\"     \"Test Тест\" \"\\124\\000\\145\\000\\163\\000\\164\\000\\040\\000\\042\\004\\065\\004\\101\\004\\102\\004\"\n+test_commit_utf8_checkout_other \"UTF-16BE\"     \"Test Тест\" \"\\000\\124\\000\\145\\000\\163\\000\\164\\000\\040\\004\\042\\004\\065\\004\\101\\004\\102\"\n+test_commit_utf8_checkout_other \"UTF-16LE-BOM\" \"Test Тест\" \"\\377\\376\\124\\000\\145\\000\\163\\000\\164\\000\\040\\000\\042\\004\\065\\004\\101\\004\\102\\004\"\n+test_commit_utf8_checkout_other \"UTF-16BE-BOM\" \"Test Тест\" \"\\376\\377\\000\\124\\000\\145\\000\\163\\000\\164\\000\\040\\004\\042\\004\\065\\004\\101\\004\\102\"\n+test_commit_utf8_checkout_other \"UTF-32LE\"     \"Test Тест\" \"\\124\\000\\000\\000\\145\\000\\000\\000\\163\\000\\000\\000\\164\\000\\000\\000\\040\\000\\000\\000\\042\\004\\000\\000\\065\\004\\000\\000\\101\\004\\000\\000\\102\\004\\000\\000\"\n+test_commit_utf8_checkout_other \"UTF-32BE\"     \"Test Тест\" \"\\000\\000\\000\\124\\000\\000\\000\\145\\000\\000\\000\\163\\000\\000\\000\\164\\000\\000\\000\\040\\000\\000\\004\\042\\000\\000\\004\\065\\000\\000\\004\\101\\000\\000\\004\\102\"\n+\n test_done\n-- \ngitgitgadget\n"},{"id":"382760","messageId":"d717a60932223443e95c000f4d17210b07d7b1a9.1569233057.git.gitgitgadget@gmail.com","threadId":"51900","inReplyTo":"pull.347.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 1/2] t0028: fix test for UTF-16-LE-BOM","fromName":"Alexandr Miloslavskiy via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-09-23T10:04:19Z","receivedAt":"2019-09-23T10:04:23Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n\nAccording to its name, the test is designed for UTF-16-LE-BOM.\nHowever, possibly due to copy&paste oversight, it was using UTF-32 file.\n\nWhile the test succeeds (probably interprets extra \\x00\\x00 as embedded\nzero), I myself had an unrelated problem which caused the test to fail.\nWhen analyzing the failure I was quite puzzled by the fact that the\ntest is obviously bugged. And it seems that I'm not alone:\nhttps://public-inbox.org/git/CAH8yC8kSakS807d4jc_BtcUJOrcVT4No37AXSz=jePxhw-o9Dg@mail.gmail.com/T/#u\n\nThis fix changes the test to follow its original intention.\n\nSigned-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n---\n t/t0028-working-tree-encoding.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex 1090e650ed..5493cf3ca9 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -40,7 +40,7 @@ test_expect_success 'setup test files' '\n \tprintf \"$text\" | write_utf16 >test.utf16.raw &&\n \tprintf \"$text\" | write_utf32 >test.utf32.raw &&\n \tprintf \"\\377\\376\"                         >test.utf16lebom.raw &&\n-\tprintf \"$text\" | iconv -f UTF-8 -t UTF-32LE >>test.utf16lebom.raw &&\n+\tprintf \"$text\" | iconv -f UTF-8 -t UTF-16LE >>test.utf16lebom.raw &&\n \n \t# Line ending tests\n \tprintf \"one\\ntwo\\nthree\\n\" >lf.utf8.raw &&\n-- \ngitgitgadget\n\n"},{"id":"382761","messageId":"40e54cf5ce74d1404187e31c94644df29134b4ff.1569233057.git.gitgitgadget@gmail.com","threadId":"51900","inReplyTo":"pull.347.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 2/2] t0028: add more tests","fromName":"Alexandr Miloslavskiy via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-09-23T10:04:19Z","receivedAt":"2019-09-23T10:04:23Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n\nAfter I discovered that UTF-16-LE-BOM test was bugged and still\nsucceeded, I decided that better tests are required. Possibly the best\noption here is to compare git results against hardcoded ground truth.\n\nThe new tests also cover more interesting chars where (ANSI != UTF-8).\n\nSigned-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n---\n t/t0028-working-tree-encoding.sh | 39 ++++++++++++++++++++++++++++++++\n 1 file changed, 39 insertions(+)\n\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex 5493cf3ca9..d0dd5dd0ea 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -280,4 +280,43 @@ test_expect_success ICONV_SHIFT_JIS 'check roundtrip encoding' '\n \tgit reset\n '\n \n+# $1: checkout encoding\n+# $2: test string\n+# $3: binary test string in checkout encoding\n+test_commit_utf8_checkout_other () {\n+\tencoding=\"$1\"\n+\torig_string=\"$2\"\n+\texpect_bytes=\"$3\"\n+\t\n+\ttest_expect_success \"Commit utf-8, checkout ${encoding}\" '\n+\t\ttest_when_finished \"git checkout HEAD -- .gitattributes\" &&\n+\t\t\n+\t\ttest_ext=\"commit_utf8_checkout_${encoding}\" &&\n+\t\ttest_file=\"test.${test_ext}\" &&\n+\t\t\n+\t\t# Commit as utf-8\n+\t\techo \"*.${test_ext} text working-tree-encoding=utf-8\" >.gitattributes &&\n+\t\tprintf \"${orig_string}\" >\"${test_file}\" &&\n+\t\tgit add \"${test_file}\" &&\n+\t\tgit commit -m \"Test data\" &&\n+\n+\t\t# Checkout in tested encoding\n+\t\trm \"${test_file}\" &&\n+\t\techo \"*.${test_ext} text working-tree-encoding=${encoding}\" >.gitattributes &&\n+\t\tgit checkout HEAD -- \"${test_file}\" &&\n+\t\t\n+\t\t# Test\n+\t\tprintf \"${expect_bytes}\" > \"${test_file}.raw\" &&\n+\t\ttest_cmp_bin \"${test_file}.raw\" \"${test_file}\"\n+\t'\n+}\n+\n+test_commit_utf8_checkout_other \"UTF-8\"        \"Test Тест\" \"\\124\\145\\163\\164\\040\\320\\242\\320\\265\\321\\201\\321\\202\"\n+test_commit_utf8_checkout_other \"UTF-16LE\"     \"Test Тест\" \"\\124\\000\\145\\000\\163\\000\\164\\000\\040\\000\\042\\004\\065\\004\\101\\004\\102\\004\"\n+test_commit_utf8_checkout_other \"UTF-16BE\"     \"Test Тест\" \"\\000\\124\\000\\145\\000\\163\\000\\164\\000\\040\\004\\042\\004\\065\\004\\101\\004\\102\"\n+test_commit_utf8_checkout_other \"UTF-16LE-BOM\" \"Test Тест\" \"\\377\\376\\124\\000\\145\\000\\163\\000\\164\\000\\040\\000\\042\\004\\065\\004\\101\\004\\102\\004\"\n+test_commit_utf8_checkout_other \"UTF-16BE-BOM\" \"Test Тест\" \"\\376\\377\\000\\124\\000\\145\\000\\163\\000\\164\\000\\040\\004\\042\\004\\065\\004\\101\\004\\102\"\n+test_commit_utf8_checkout_other \"UTF-32LE\"     \"Test Тест\" \"\\124\\000\\000\\000\\145\\000\\000\\000\\163\\000\\000\\000\\164\\000\\000\\000\\040\\000\\000\\000\\042\\004\\000\\000\\065\\004\\000\\000\\101\\004\\000\\000\\102\\004\\000\\000\"\n+test_commit_utf8_checkout_other \"UTF-32BE\"     \"Test Тест\" \"\\000\\000\\000\\124\\000\\000\\000\\145\\000\\000\\000\\163\\000\\000\\000\\164\\000\\000\\000\\040\\000\\000\\004\\042\\000\\000\\004\\065\\000\\000\\004\\101\\000\\000\\004\\102\"\n+\n test_done\n-- \ngitgitgadget\n"},{"id":"382762","messageId":"pull.347.v2.git.gitgitgadget@gmail.com","threadId":"51900","inReplyTo":"pull.347.git.gitgitgadget@gmail.com","subject":"[PATCH v2 0/2] Update: fixed typos in commit message","fromName":"Alexandr Miloslavskiy via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-09-23T10:04:18Z","receivedAt":"2019-09-23T10:04:25Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"Commit 1/2: t0028: fix test for UTF-16-LE-BOM Commit 2/2: t0028: add more\ntests Please refer to individual commit messages for more information.\n\nAlexandr Miloslavskiy (2):\n  t0028: fix test for UTF-16-LE-BOM\n  t0028: add more tests\n\n t/t0028-working-tree-encoding.sh | 41 +++++++++++++++++++++++++++++++-\n 1 file changed, 40 insertions(+), 1 deletion(-)\n\n\nbase-commit: 4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-347%2FSyntevoAlex%2F%230189_t0028_fixes-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-347/SyntevoAlex/#0189_t0028_fixes-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/347\n\nRange-diff vs v1:\n\n 1:  fe850a8cd5 ! 1:  d717a60932 t0028: fix test for UTF-16-LE-BOM\n     @@ -2,12 +2,12 @@\n      \n          t0028: fix test for UTF-16-LE-BOM\n      \n     -    According to its name, the test its designed for UTF-16-LE-BOM.\n     +    According to its name, the test is designed for UTF-16-LE-BOM.\n          However, possibly due to copy&paste oversight, it was using UTF-32 file.\n      \n          While the test succeeds (probably interprets extra \\x00\\x00 as embedded\n          zero), I myself had an unrelated problem which caused the test to fail.\n     -    When analyzing the      failure I was quite puzzled by the fact that the\n     +    When analyzing the failure I was quite puzzled by the fact that the\n          test is obviously bugged. And it seems that I'm not alone:\n          https://public-inbox.org/git/CAH8yC8kSakS807d4jc_BtcUJOrcVT4No37AXSz=jePxhw-o9Dg@mail.gmail.com/T/#u\n      \n 2:  d5f6f00a51 = 2:  40e54cf5ce t0028: add more tests\n\n-- \ngitgitgadget\n"},{"id":"382829","messageId":"20190924034611.6bsy627udlzgxuv2@tb-raspi4","threadId":"51900","inReplyTo":"d717a60932223443e95c000f4d17210b07d7b1a9.1569233057.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 1/2] t0028: fix test for UTF-16-LE-BOM","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-09-24T03:46:11Z","receivedAt":"2019-09-24T03:46:25Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Mon, Sep 23, 2019 at 03:04:19AM -0700, Alexandr Miloslavskiy via GitGitGadget wrote:\n> From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n>\n> According to its name, the test is designed for UTF-16-LE-BOM.\n> However, possibly due to copy&paste oversight, it was using UTF-32 file.\n>\n> While the test succeeds (probably interprets extra \\x00\\x00 as embedded\n\nWe can probably drop the \"probably\" ?\n\n> zero), I myself had an unrelated problem which caused the test to fail.\n\nOut of curiosity:\nWhat made the test fail, and does it pass noe ?\n\n> When analyzing the failure I was quite puzzled by the fact that the\n> test is obviously bugged. And it seems that I'm not alone:\n> https://public-inbox.org/git/CAH8yC8kSakS807d4jc_BtcUJOrcVT4No37AXSz=jePxhw-o9Dg@mail.gmail.com/T/#u\n>\n> This fix changes the test to follow its original intention.\n\nThanks for debugging and cleaning up my mess.\nThe patch is correct, and I have one or two small improvements in the\nwording.\n\nHow about the following:\n\nAccording to its name, the test is designed for UTF-16-LE-BOM.\nHowever, possibly due to copy&paste oversight, it was using UTF-32.\n\nWhile the test succeeds (extra \\000\\000 are interpreted as NUL),\nI myself had an unrelated problem which caused the test to fail.\nWhen analyzing the failure I was quite puzzled by the fact that the\ntest is obviously bugged. And it seems that I'm not alone:\nhttps://public-inbox.org/git/CAH8yC8kSakS807d4jc_BtcUJOrcVT4No37AXSz=jePxhw-o9Dg@mail.gmail.com/T/#u\n\nFix the test to follow its original intention.\n\n>\n> Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n> ---\n>  t/t0028-working-tree-encoding.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\n> index 1090e650ed..5493cf3ca9 100755\n> --- a/t/t0028-working-tree-encoding.sh\n> +++ b/t/t0028-working-tree-encoding.sh\n> @@ -40,7 +40,7 @@ test_expect_success 'setup test files' '\n>  \tprintf \"$text\" | write_utf16 >test.utf16.raw &&\n>  \tprintf \"$text\" | write_utf32 >test.utf32.raw &&\n>  \tprintf \"\\377\\376\"                         >test.utf16lebom.raw &&\n> -\tprintf \"$text\" | iconv -f UTF-8 -t UTF-32LE >>test.utf16lebom.raw &&\n> +\tprintf \"$text\" | iconv -f UTF-8 -t UTF-16LE >>test.utf16lebom.raw &&\n>\n>  \t# Line ending tests\n>  \tprintf \"one\\ntwo\\nthree\\n\" >lf.utf8.raw &&\n> --\n> gitgitgadget\n>\n>\n"},{"id":"382830","messageId":"20190924040637.2hybnk54ehf3uhoa@tb-raspi4","threadId":"51900","inReplyTo":"40e54cf5ce74d1404187e31c94644df29134b4ff.1569233057.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 2/2] t0028: add more tests","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-09-24T04:06:37Z","receivedAt":"2019-09-24T04:09:50Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Mon, Sep 23, 2019 at 03:04:19AM -0700, Alexandr Miloslavskiy via GitGitGadget wrote:\n> From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n\nThanks for the tests, some nit-picks inline.\n\n>\n> After I discovered that UTF-16-LE-BOM test was bugged and still\n> succeeded...\n\nMy interpretation is that the \\000\\000 must be handled correctly\non all platforms, and that seems to be the case.\n\nWould this make more sense:\n\nAfter I discovered that UTF-16-LE-BOM test was bugged,\nI decided that better tests are required\n\n> ... I decided that better tests are required. Possibly the best\n> option here is to compare git results against hardcoded ground truth.\n\n\n>\n> The new tests also cover more interesting chars where (ANSI != UTF-8).\n>\n> Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n> ---\n>  t/t0028-working-tree-encoding.sh | 39 ++++++++++++++++++++++++++++++++\n>  1 file changed, 39 insertions(+)\n>\n> diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\n> index 5493cf3ca9..d0dd5dd0ea 100755\n> --- a/t/t0028-working-tree-encoding.sh\n> +++ b/t/t0028-working-tree-encoding.sh\n> @@ -280,4 +280,43 @@ test_expect_success ICONV_SHIFT_JIS 'check roundtrip encoding' '\n>  \tgit reset\n>  '\n>\n> +# $1: checkout encoding\n> +# $2: test string\n> +# $3: binary test string in checkout encoding\n> +test_commit_utf8_checkout_other () {\n> +\tencoding=\"$1\"\n> +\torig_string=\"$2\"\n> +\texpect_bytes=\"$3\"\n> +\n> +\ttest_expect_success \"Commit utf-8, checkout ${encoding}\" '\n\nGeneral remark:\nDo we need the {} here?\n${encoding} could be simpler written as $encoding\n\n> +\t\ttest_when_finished \"git checkout HEAD -- .gitattributes\" &&\n> +\n> +\t\ttest_ext=\"commit_utf8_checkout_${encoding}\" &&\n> +\t\ttest_file=\"test.${test_ext}\" &&\n> +\n> +\t\t# Commit as utf-8\n\nAnother nit-pick:\nLooking at the other test cases, should utf-8 be written as UTF-8\nfor consistency ?\n\n> +\t\techo \"*.${test_ext} text working-tree-encoding=utf-8\" >.gitattributes &&\n> +\t\tprintf \"${orig_string}\" >\"${test_file}\" &&\n> +\t\tgit add \"${test_file}\" &&\n> +\t\tgit commit -m \"Test data\" &&\n> +\n> +\t\t# Checkout in tested encoding\n> +\t\trm \"${test_file}\" &&\n> +\t\techo \"*.${test_ext} text working-tree-encoding=${encoding}\" >.gitattributes &&\n> +\t\tgit checkout HEAD -- \"${test_file}\" &&\n> +\n> +\t\t# Test\n> +\t\tprintf \"${expect_bytes}\" > \"${test_file}.raw\" &&\n> +\t\ttest_cmp_bin \"${test_file}.raw\" \"${test_file}\"\n\nMore a style-nit: could we simply write like this:\n \t\tprintf $expect_bytes > $test_file.raw &&\n\t\ttest_cmp_bin $test_file.raw $test_file\n\n(Even on other places)\n\n> +\t'\n> +}\n> +\n> +test_commit_utf8_checkout_other \"UTF-8\"        \"Test Тест\" \"\\124\\145\\163\\164\\040\\320\\242\\320\\265\\321\\201\\321\\202\"\n> +test_commit_utf8_checkout_other \"UTF-16LE\"     \"Test Тест\" \"\\124\\000\\145\\000\\163\\000\\164\\000\\040\\000\\042\\004\\065\\004\\101\\004\\102\\004\"\n> +test_commit_utf8_checkout_other \"UTF-16BE\"     \"Test Тест\" \"\\000\\124\\000\\145\\000\\163\\000\\164\\000\\040\\004\\042\\004\\065\\004\\101\\004\\102\"\n> +test_commit_utf8_checkout_other \"UTF-16LE-BOM\" \"Test Тест\" \"\\377\\376\\124\\000\\145\\000\\163\\000\\164\\000\\040\\000\\042\\004\\065\\004\\101\\004\\102\\004\"\n> +test_commit_utf8_checkout_other \"UTF-16BE-BOM\" \"Test Тест\" \"\\376\\377\\000\\124\\000\\145\\000\\163\\000\\164\\000\\040\\004\\042\\004\\065\\004\\101\\004\\102\"\n> +test_commit_utf8_checkout_other \"UTF-32LE\"     \"Test Тест\" \"\\124\\000\\000\\000\\145\\000\\000\\000\\163\\000\\000\\000\\164\\000\\000\\000\\040\\000\\000\\000\\042\\004\\000\\000\\065\\004\\000\\000\\101\\004\\000\\000\\102\\004\\000\\000\"\n> +test_commit_utf8_checkout_other \"UTF-32BE\"     \"Test Тест\" \"\\000\\000\\000\\124\\000\\000\\000\\145\\000\\000\\000\\163\\000\\000\\000\\164\\000\\000\\000\\040\\000\\000\\004\\042\\000\\000\\004\\065\\000\\000\\004\\101\\000\\000\\004\\102\"\n> +\n>  test_done\n> --\n> gitgitgadget\n>\n"},{"id":"382831","messageId":"163fcc3c-e827-ad15-5987-a2ae93a0bec2@kdbg.org","threadId":"51900","inReplyTo":"40e54cf5ce74d1404187e31c94644df29134b4ff.1569233057.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 2/2] t0028: add more tests","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2019-09-24T06:21:11Z","receivedAt":"2019-09-24T06:21:16Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 23.09.19 um 12:04 schrieb Alexandr Miloslavskiy via GitGitGadget:\n> From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n> \n> After I discovered that UTF-16-LE-BOM test was bugged and still\n> succeeded, I decided that better tests are required. Possibly the best\n> option here is to compare git results against hardcoded ground truth.\n> \n> The new tests also cover more interesting chars where (ANSI != UTF-8).\n\nWhat are we testing here? Is there some back-and-forth conversion going\non, and are we testing that the conversion happens at all, or that the\ncorrect conversion/encoding is picked, or that the conversion that is\nfinally chosen is correct? Why does it help to test more interesting\nchars (and would you not also regard codepoints outside the BMP the most\ninteresting because they require surrogate codepoints in UTF-16)?\n\n-- Hannes\n"},{"id":"382840","messageId":"847a5ce7-0228-501b-e753-1688c4a24b01@syntevo.com","threadId":"51900","inReplyTo":"20190924034611.6bsy627udlzgxuv2@tb-raspi4","subject":"Re: [PATCH v2 1/2] t0028: fix test for UTF-16-LE-BOM","fromName":"Alexandr Miloslavskiy","fromEmail":"alexandr.miloslavskiy@syntevo.com","sentAt":"2019-09-24T09:53:39Z","receivedAt":"2019-09-24T10:02:25Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"On 24.09.2019 5:46, Torsten Bögershausen wrote:\n> Out of curiosity:\n> What made the test fail, and does it pass noe ?\n\nIt failed to a bug in Windows Debug build, which caused iconv() to fail\nin most cases, see:\nhttps://public-inbox.org/git/pull.348.git.gitgitgadget@gmail.com/\n\n> How about the following:\n\nSure thing, I will use the wording you suggested.\n"},{"id":"382841","messageId":"5250c693-2d6b-69a1-3ed0-8a3fb3396e30@syntevo.com","threadId":"51900","inReplyTo":"20190924040637.2hybnk54ehf3uhoa@tb-raspi4","subject":"Re: [PATCH v2 2/2] t0028: add more tests","fromName":"Alexandr Miloslavskiy","fromEmail":"alexandr.miloslavskiy@syntevo.com","sentAt":"2019-09-24T10:03:54Z","receivedAt":"2019-09-24T10:04:01Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"On 24.09.2019 6:06, Torsten Bögershausen wrote:\n> Would this make more sense:\n> After I discovered that UTF-16-LE-BOM test was bugged,\n> I decided that better tests are required\n\nOK\n\n > Looking at the other test cases, should utf-8 be written as UTF-8\n > for consistency ?\n\nOK\n\n > General remark:\n > Do we need the {} here?\n > ${encoding} could be simpler written as $encoding\n\n > More a style-nit: could we simply write like this:\n > printf $expect_bytes > $test_file.raw &&\n > test_cmp_bin $test_file.raw $test_file\n\nThis is pretty much my first experience with test framework\n(and maybe third with shell scripts...). I will change as suggested.\n"},{"id":"382843","messageId":"9f681989-b2cf-ff66-b2e8-2a2823d5609c@syntevo.com","threadId":"51900","inReplyTo":"163fcc3c-e827-ad15-5987-a2ae93a0bec2@kdbg.org","subject":"Re: [PATCH v2 2/2] t0028: add more tests","fromName":"Alexandr Miloslavskiy","fromEmail":"alexandr.miloslavskiy@syntevo.com","sentAt":"2019-09-24T10:31:38Z","receivedAt":"2019-09-24T10:31:44Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"On 24.09.2019 8:21, Johannes Sixt wrote:\n> What are we testing here? Is there some back-and-forth conversion going\n> on, and are we testing that the conversion happens at all, or that the\n> correct conversion/encoding is picked, or that the conversion that is\n> finally chosen is correct? Why does it help to test more interesting\n> chars (and would you not also regard codepoints outside the BMP the most\n> interesting because they require surrogate codepoints in UTF-16)?\n\nAccording to my understanding (I'm not the author of test package),\nit is designed to test that various encodings are properly supported\nby git in the working tree.\n\nThe new tests are designed to avoid any back-and-forth, which actually\nhappened for the previous UTF-16-LE-BOM test, which in turn hidden\nthat the test was bugged.\n\nOtherwise, the test verifies that if you requested some encoding, you\nget exactly that, and it covers various potential problems at once.\n\n > Why does it help to test more interesting chars (and would you not\n > also regard codepoints outside the BMP the most interesting because\n > they require surrogate codepoints in UTF-16)?\n\t\t\t\t\t\nIt helps to cover more potential problems. One could agree that\nconverting latin characters is mostly about padding/dropping zero\nchars, but this approach could never work for the chars I used. As for\n\"outside the BMP\", I'm simply not experienced with that. If you are,\nyou're welcome to further improve the tests I added.\n\n"},{"id":"382844","messageId":"e4410274e61f17d6f162a9218138cd2e56de7b7b.1569321628.git.gitgitgadget@gmail.com","threadId":"51900","inReplyTo":"pull.347.v3.git.gitgitgadget@gmail.com","subject":"[PATCH v3 2/2] t0028: add more tests","fromName":"Alexandr Miloslavskiy via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-09-24T10:40:30Z","receivedAt":"2019-09-24T10:40:33Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n\nAfter I discovered that UTF-16-LE-BOM test was bugged, I decided that\nbetter tests are required. Possibly the best option here is to compare\ngit results against hardcoded ground truth.\n\nThe new tests also cover more interesting chars where (ANSI != UTF-8).\n\nSigned-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n---\n t/t0028-working-tree-encoding.sh | 39 ++++++++++++++++++++++++++++++++\n 1 file changed, 39 insertions(+)\n\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex 5493cf3ca9..c4d98a1aae 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -280,4 +280,43 @@ test_expect_success ICONV_SHIFT_JIS 'check roundtrip encoding' '\n \tgit reset\n '\n \n+# $1: checkout encoding\n+# $2: test string\n+# $3: binary test string in checkout encoding\n+test_commit_utf8_checkout_other () {\n+\tencoding=\"$1\"\n+\torig_string=\"$2\"\n+\texpect_bytes=\"$3\"\n+\t\n+\ttest_expect_success \"Commit UTF-8, checkout $encoding\" '\n+\t\ttest_when_finished \"git checkout HEAD -- .gitattributes\" &&\n+\t\t\n+\t\ttest_ext=\"commit_utf8_checkout_$encoding\" &&\n+\t\ttest_file=\"test.$test_ext\" &&\n+\t\t\n+\t\t# Commit as UTF-8\n+\t\techo \"*.$test_ext text working-tree-encoding=UTF-8\" >.gitattributes &&\n+\t\tprintf \"$orig_string\" >$test_file &&\n+\t\tgit add $test_file &&\n+\t\tgit commit -m \"Test data\" &&\n+\n+\t\t# Checkout in tested encoding\n+\t\trm $test_file &&\n+\t\techo \"*.$test_ext text working-tree-encoding=$encoding\" >.gitattributes &&\n+\t\tgit checkout HEAD -- $test_file &&\n+\t\t\n+\t\t# Test\n+\t\tprintf $expect_bytes >$test_file.raw &&\n+\t\ttest_cmp_bin $test_file.raw $test_file\n+\t'\n+}\n+\n+test_commit_utf8_checkout_other \"UTF-8\"        \"Test Тест\" \"\\124\\145\\163\\164\\040\\320\\242\\320\\265\\321\\201\\321\\202\"\n+test_commit_utf8_checkout_other \"UTF-16LE\"     \"Test Тест\" \"\\124\\000\\145\\000\\163\\000\\164\\000\\040\\000\\042\\004\\065\\004\\101\\004\\102\\004\"\n+test_commit_utf8_checkout_other \"UTF-16BE\"     \"Test Тест\" \"\\000\\124\\000\\145\\000\\163\\000\\164\\000\\040\\004\\042\\004\\065\\004\\101\\004\\102\"\n+test_commit_utf8_checkout_other \"UTF-16LE-BOM\" \"Test Тест\" \"\\377\\376\\124\\000\\145\\000\\163\\000\\164\\000\\040\\000\\042\\004\\065\\004\\101\\004\\102\\004\"\n+test_commit_utf8_checkout_other \"UTF-16BE-BOM\" \"Test Тест\" \"\\376\\377\\000\\124\\000\\145\\000\\163\\000\\164\\000\\040\\004\\042\\004\\065\\004\\101\\004\\102\"\n+test_commit_utf8_checkout_other \"UTF-32LE\"     \"Test Тест\" \"\\124\\000\\000\\000\\145\\000\\000\\000\\163\\000\\000\\000\\164\\000\\000\\000\\040\\000\\000\\000\\042\\004\\000\\000\\065\\004\\000\\000\\101\\004\\000\\000\\102\\004\\000\\000\"\n+test_commit_utf8_checkout_other \"UTF-32BE\"     \"Test Тест\" \"\\000\\000\\000\\124\\000\\000\\000\\145\\000\\000\\000\\163\\000\\000\\000\\164\\000\\000\\000\\040\\000\\000\\004\\042\\000\\000\\004\\065\\000\\000\\004\\101\\000\\000\\004\\102\"\n+\n test_done\n-- \ngitgitgadget\n"},{"id":"382845","messageId":"pull.347.v3.git.gitgitgadget@gmail.com","threadId":"51900","inReplyTo":"pull.347.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v3 0/2] Update: fixed typos in commit message","fromName":"Alexandr Miloslavskiy via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-09-24T10:40:28Z","receivedAt":"2019-09-24T10:40:34Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"Commit 1/2: t0028: fix test for UTF-16-LE-BOM Commit 2/2: t0028: add more\ntests Please refer to individual commit messages for more information.\n\nAlexandr Miloslavskiy (2):\n  t0028: fix test for UTF-16-LE-BOM\n  t0028: add more tests\n\n t/t0028-working-tree-encoding.sh | 41 +++++++++++++++++++++++++++++++-\n 1 file changed, 40 insertions(+), 1 deletion(-)\n\n\nbase-commit: 4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-347%2FSyntevoAlex%2F%230189_t0028_fixes-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-347/SyntevoAlex/#0189_t0028_fixes-v3\nPull-Request: https://github.com/gitgitgadget/git/pull/347\n\nRange-diff vs v2:\n\n 1:  d717a60932 ! 1:  438ac961a5 t0028: fix test for UTF-16-LE-BOM\n     @@ -3,15 +3,15 @@\n          t0028: fix test for UTF-16-LE-BOM\n      \n          According to its name, the test is designed for UTF-16-LE-BOM.\n     -    However, possibly due to copy&paste oversight, it was using UTF-32 file.\n     +    However, possibly due to copy&paste oversight, it was using UTF-32.\n      \n     -    While the test succeeds (probably interprets extra \\x00\\x00 as embedded\n     -    zero), I myself had an unrelated problem which caused the test to fail.\n     +    While the test succeeds (extra \\000\\000 are interpreted as NUL),\n     +    I myself had an unrelated problem which caused the test to fail.\n          When analyzing the failure I was quite puzzled by the fact that the\n          test is obviously bugged. And it seems that I'm not alone:\n          https://public-inbox.org/git/CAH8yC8kSakS807d4jc_BtcUJOrcVT4No37AXSz=jePxhw-o9Dg@mail.gmail.com/T/#u\n      \n     -    This fix changes the test to follow its original intention.\n     +    Fix the test to follow its original intention.\n      \n          Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n      \n 2:  40e54cf5ce ! 2:  e4410274e6 t0028: add more tests\n     @@ -2,9 +2,9 @@\n      \n          t0028: add more tests\n      \n     -    After I discovered that UTF-16-LE-BOM test was bugged and still\n     -    succeeded, I decided that better tests are required. Possibly the best\n     -    option here is to compare git results against hardcoded ground truth.\n     +    After I discovered that UTF-16-LE-BOM test was bugged, I decided that\n     +    better tests are required. Possibly the best option here is to compare\n     +    git results against hardcoded ground truth.\n      \n          The new tests also cover more interesting chars where (ANSI != UTF-8).\n      \n     @@ -25,26 +25,26 @@\n      +\torig_string=\"$2\"\n      +\texpect_bytes=\"$3\"\n      +\t\n     -+\ttest_expect_success \"Commit utf-8, checkout ${encoding}\" '\n     ++\ttest_expect_success \"Commit UTF-8, checkout $encoding\" '\n      +\t\ttest_when_finished \"git checkout HEAD -- .gitattributes\" &&\n      +\t\t\n     -+\t\ttest_ext=\"commit_utf8_checkout_${encoding}\" &&\n     -+\t\ttest_file=\"test.${test_ext}\" &&\n     ++\t\ttest_ext=\"commit_utf8_checkout_$encoding\" &&\n     ++\t\ttest_file=\"test.$test_ext\" &&\n      +\t\t\n     -+\t\t# Commit as utf-8\n     -+\t\techo \"*.${test_ext} text working-tree-encoding=utf-8\" >.gitattributes &&\n     -+\t\tprintf \"${orig_string}\" >\"${test_file}\" &&\n     -+\t\tgit add \"${test_file}\" &&\n     ++\t\t# Commit as UTF-8\n     ++\t\techo \"*.$test_ext text working-tree-encoding=UTF-8\" >.gitattributes &&\n     ++\t\tprintf \"$orig_string\" >$test_file &&\n     ++\t\tgit add $test_file &&\n      +\t\tgit commit -m \"Test data\" &&\n      +\n      +\t\t# Checkout in tested encoding\n     -+\t\trm \"${test_file}\" &&\n     -+\t\techo \"*.${test_ext} text working-tree-encoding=${encoding}\" >.gitattributes &&\n     -+\t\tgit checkout HEAD -- \"${test_file}\" &&\n     ++\t\trm $test_file &&\n     ++\t\techo \"*.$test_ext text working-tree-encoding=$encoding\" >.gitattributes &&\n     ++\t\tgit checkout HEAD -- $test_file &&\n      +\t\t\n      +\t\t# Test\n     -+\t\tprintf \"${expect_bytes}\" > \"${test_file}.raw\" &&\n     -+\t\ttest_cmp_bin \"${test_file}.raw\" \"${test_file}\"\n     ++\t\tprintf $expect_bytes >$test_file.raw &&\n     ++\t\ttest_cmp_bin $test_file.raw $test_file\n      +\t'\n      +}\n      +\n\n-- \ngitgitgadget\n"},{"id":"382846","messageId":"438ac961a559b656326ebef0b3a7cf924f4ccfd2.1569321628.git.gitgitgadget@gmail.com","threadId":"51900","inReplyTo":"pull.347.v3.git.gitgitgadget@gmail.com","subject":"[PATCH v3 1/2] t0028: fix test for UTF-16-LE-BOM","fromName":"Alexandr Miloslavskiy via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-09-24T10:40:29Z","receivedAt":"2019-09-24T10:40:34Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n\nAccording to its name, the test is designed for UTF-16-LE-BOM.\nHowever, possibly due to copy&paste oversight, it was using UTF-32.\n\nWhile the test succeeds (extra \\000\\000 are interpreted as NUL),\nI myself had an unrelated problem which caused the test to fail.\nWhen analyzing the failure I was quite puzzled by the fact that the\ntest is obviously bugged. And it seems that I'm not alone:\nhttps://public-inbox.org/git/CAH8yC8kSakS807d4jc_BtcUJOrcVT4No37AXSz=jePxhw-o9Dg@mail.gmail.com/T/#u\n\nFix the test to follow its original intention.\n\nSigned-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n---\n t/t0028-working-tree-encoding.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex 1090e650ed..5493cf3ca9 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -40,7 +40,7 @@ test_expect_success 'setup test files' '\n \tprintf \"$text\" | write_utf16 >test.utf16.raw &&\n \tprintf \"$text\" | write_utf32 >test.utf32.raw &&\n \tprintf \"\\377\\376\"                         >test.utf16lebom.raw &&\n-\tprintf \"$text\" | iconv -f UTF-8 -t UTF-32LE >>test.utf16lebom.raw &&\n+\tprintf \"$text\" | iconv -f UTF-8 -t UTF-16LE >>test.utf16lebom.raw &&\n \n \t# Line ending tests\n \tprintf \"one\\ntwo\\nthree\\n\" >lf.utf8.raw &&\n-- \ngitgitgadget\n\n"},{"id":"383020","messageId":"20190926193707.wx4iu3ctbmbssxwd@tb-raspi4","threadId":"51900","inReplyTo":"pull.347.v3.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v3 0/2] Update: fixed typos in commit message","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-09-26T19:37:07Z","receivedAt":"2019-09-26T19:37:16Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Tue, Sep 24, 2019 at 03:40:28AM -0700, Alexandr Miloslavskiy via GitGitGadget wrote:\n> Commit 1/2: t0028: fix test for UTF-16-LE-BOM Commit 2/2: t0028: add more\n> tests Please refer to individual commit messages for more information.\n>\n> Alexandr Miloslavskiy (2):\n>   t0028: fix test for UTF-16-LE-BOM\n>   t0028: add more tests\n>\n\nThanks for the update -\nReviewed-by:  Torsten Bögershausen <tboegi@web.de>\n"},{"id":"383083","messageId":"xmqqv9tdjacr.fsf@gitster-ct.c.googlers.com","threadId":"51900","inReplyTo":"e4410274e61f17d6f162a9218138cd2e56de7b7b.1569321628.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v3 2/2] t0028: add more tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-09-28T04:47:16Z","receivedAt":"2019-09-28T04:48:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Alexandr Miloslavskiy via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>\n>\n> After I discovered that UTF-16-LE-BOM test was bugged, I decided that\n\ns/bugged/buggy/ perhaps?  Usually people do not place hidden\nlistening devices in tests ;-)\n\n> better tests are required. Possibly the best option here is to compare\n> git results against hardcoded ground truth.\n> ...\n> +test_commit_utf8_checkout_other \"UTF-8\"        \"Test Тест\" \"\\124\\145\\163\\164\\040\\320\\242\\320\\265\\321\\201\\321\\202\"\n> +test_commit_utf8_checkout_other \"UTF-16LE\"     \"Test Тест\" \"\\124\\000\\145\\000\\163\\000\\164\\000\\040\\000\\042\\004\\065\\004\\101\\004\\102\\004\"\n> +test_commit_utf8_checkout_other \"UTF-16BE\"     \"Test Тест\" \"\\000\\124\\000\\145\\000\\163\\000\\164\\000\\040\\004\\042\\004\\065\\004\\101\\004\\102\"\n> +test_commit_utf8_checkout_other \"UTF-16LE-BOM\" \"Test Тест\" \"\\377\\376\\124\\000\\145\\000\\163\\000\\164\\000\\040\\000\\042\\004\\065\\004\\101\\004\\102\\004\"\n> +test_commit_utf8_checkout_other \"UTF-16BE-BOM\" \"Test Тест\" \"\\376\\377\\000\\124\\000\\145\\000\\163\\000\\164\\000\\040\\004\\042\\004\\065\\004\\101\\004\\102\"\n> +test_commit_utf8_checkout_other \"UTF-32LE\"     \"Test Тест\" \"\\124\\000\\000\\000\\145\\000\\000\\000\\163\\000\\000\\000\\164\\000\\000\\000\\040\\000\\000\\000\\042\\004\\000\\000\\065\\004\\000\\000\\101\\004\\000\\000\\102\\004\\000\\000\"\n> +test_commit_utf8_checkout_other \"UTF-32BE\"     \"Test Тест\" \"\\000\\000\\000\\124\\000\\000\\000\\145\\000\\000\\000\\163\\000\\000\\000\\164\\000\\000\\000\\040\\000\\000\\004\\042\\000\\000\\004\\065\\000\\000\\004\\101\\000\\000\\004\\102\"\n"},{"id":"383126","messageId":"295b07ab-504a-30d6-7f40-fa7c37340638@syntevo.com","threadId":"51900","inReplyTo":"xmqqv9tdjacr.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v3 2/2] t0028: add more tests","fromName":"Alexandr Miloslavskiy","fromEmail":"alexandr.miloslavskiy@syntevo.com","sentAt":"2019-09-30T07:26:04Z","receivedAt":"2019-09-30T07:29:45Z","isPatch":true,"sender":{"key":"alexandr.miloslavskiy@syntevo.com","avatar":null},"body":"On 28.09.2019 6:47, Junio C Hamano wrote:\n> s/bugged/buggy/ perhaps?  Usually people do not place hidden\n> listening devices in tests ;-)\n\nYes, hinting those hidden listening devices was an oversight. Thanks for \nyour help in putting them back undercover!\n\nI understand that you already changed the commit message, so I'm not \nsubmitting updated patch.\n"}]}