{"thread":{"id":"50011","subject":"[PATCH 0/1] .gitattributes: ensure t/oid-info/* has eol=lf","startedAt":"2018-12-11T20:35:49Z","lastAt":"2018-12-14T11:11:28Z","messageCount":16,"participants":["Derrick Stolee via GitGitGadget","Junio C Hamano","SZEDER Gábor","Johannes Schindelin via GitGitGadget","Johannes Schindelin","Derrick Stolee","brian m. carlson"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"365115","messageId":"pull.98.git.gitgitgadget@gmail.com","threadId":"50011","inReplyTo":null,"subject":"[PATCH 0/1] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"Derrick Stolee via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-12-11T20:35:45Z","receivedAt":"2018-12-11T20:35:49Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"I noticed that our CI builds (see [1] for an example) were returning success\nmuch faster than they did before Git v2.20.0. Turns out that there was a\ntest script failure involving the new test hash logic.\n\nerror: bug in the test script: bad hash algorithm\nmake[1]: *** [Makefile:56: t0000-basic.sh] Error 1\nmake[1]: *** Waiting for unfinished jobs....\n\nThe reason this passed was because we were running this command in our\nbuild:\n\nmake GIT_TEST_OPTS=--quiet -j 10 -C t ||\nmake GIT_TEST_OPTS=\\\"-i -v -x\\\" -k -C t failed \n\nThe first make failed, but the test script did not record any failed tests\nand hence the second command succeeded.\n\nThe test bug relates to this function added by 2c02b110d \"t: add test\nfunctions to translate hash-related values\":\n\n+# Load key-value pairs from stdin suitable for use with test_oid.  Blank lines\n+# and lines starting with \"#\" are ignored.  Keys must be shell identifier\n+# characters.\n+#\n+# Examples:\n+# rawsz sha1:20\n+# rawsz sha256:32\n+test_oid_cache () {\n+       local tag rest k v &&\n+\n+       { test -n \"$test_hash_algo\" || test_detect_hash; } &&\n+       while read tag rest\n+       do\n+               case $tag in\n+               \\#*)\n+                       continue;;\n+               ?*)\n+                       # non-empty\n+                       ;;\n+               *)\n+                       # blank line\n+                       continue;;\n+               esac &&\n+\n+               k=\"${rest%:*}\" &&\n+               v=\"${rest#*:}\" &&\n+\n+               if ! expr \"$k\" : '[a-z0-9][a-z0-9]*$' >/dev/null\n+               then\n+                       error 'bug in the test script: bad hash algorithm'\n+               fi &&\n+               eval \"test_oid_${k}_$tag=\\\"\\$v\\\"\"\n+       done\n+}\n\nThe verbose output included these values. Note how '\\r' appears in the\nvariable values.\n\n++ test_oid_init\n++ test -n ''\n++ test_detect_hash\n++ test_hash_algo=sha1\n++ test_oid_cache\n++ local tag rest k v\n++ test -n sha1\n++ read tag rest\n++ case $tag in\n++ k=sha1\n++ v=$'20\\r'\n++ expr sha1 : '[a-z0-9][a-z0-9]*$'\n++ eval 'test_oid_sha1_rawsz=\"$v\"'\n+++ test_oid_sha1_rawsz=$'20\\r'\n++ read tag rest\n++ case $tag in\n++ k=sha256\n++ v=$'32\\r'\n++ expr sha256 : '[a-z0-9][a-z0-9]*$'\n++ eval 'test_oid_sha256_rawsz=\"$v\"'\n+++ test_oid_sha256_rawsz=$'32\\r'\n++ read tag rest\n++ case $tag in\n++ k=\n++ v=\n++ expr '' : '[a-z0-9][a-z0-9]*$'\n\n[1] https://gvfs.visualstudio.com/ci/_build/results?buildId=4815\n\nDerrick Stolee (1):\n  .gitattributes: ensure t/oid-info/* has eol=lf\n\n .gitattributes | 1 +\n 1 file changed, 1 insertion(+)\n\n\nbase-commit: 5d826e972970a784bd7a7bdf587512510097b8c7\nPublished-As: https://github.com/gitgitgadget/git/releases/tags/pr-98%2Fderrickstolee%2Ftest-oid-fix-windows-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-98/derrickstolee/test-oid-fix-windows-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/98\n-- \ngitgitgadget\n"},{"id":"365116","messageId":"4a22502a318a65f144b3b6542cc5e711a1811c78.1544560544.git.gitgitgadget@gmail.com","threadId":"50011","inReplyTo":"pull.98.git.gitgitgadget@gmail.com","subject":"[PATCH 1/1] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"Derrick Stolee via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-12-11T20:35:46Z","receivedAt":"2018-12-11T20:35:50Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"From: Derrick Stolee <dstolee@microsoft.com>\n\nThe new test_oid machinery in the test library requires reading\nsome information from t/oid-info/hash-info and t/oid-info/oid.\nThe shell logic that reads from these files is sensitive to CRLF\nline endings, causing a problem when the test suite is run on a\nWindows machine that converts LF to CRLF.\n\nExclude the files in this folder from this conversion.\n\nSigned-off-by: Derrick Stolee <dstolee@microsoft.com>\n---\n .gitattributes | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/.gitattributes b/.gitattributes\nindex acf853e029..3738cea7eb 100644\n--- a/.gitattributes\n+++ b/.gitattributes\n@@ -13,3 +13,4 @@\n /Documentation/gitk.txt conflict-marker-size=32\n /Documentation/user-manual.txt conflict-marker-size=32\n /t/t????-*.sh conflict-marker-size=32\n+/t/oid-info/* eol=lf\n-- \ngitgitgadget\n"},{"id":"365162","messageId":"xmqqy38vi1h1.fsf@gitster-ct.c.googlers.com","threadId":"50011","inReplyTo":"pull.98.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/1] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-12-12T08:38:34Z","receivedAt":"2018-12-12T08:38:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Derrick Stolee via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> The verbose output included these values. Note how '\\r' appears in the\n> variable values.\n> ...\n> ++ read tag rest\n\nInteresting.  \"read\" does not realize that it is reading from a text\nfile and do whatever appropriate for the platform (i.e. treat CRLF\nas the end-of-line)?\n\n> Derrick Stolee (1):\n>   .gitattributes: ensure t/oid-info/* has eol=lf\n>\n>  .gitattributes | 1 +\n>  1 file changed, 1 insertion(+)\n\n> base-commit: 5d826e972970a784bd7a7bdf587512510097b8c7\n\nSounds good.  The base is 2.20; the problematic topic was designed\nto be mergeable to 2.19.x track, but I do not forsee us merging the\nbc/hash-independent-tests topic to the maintenance track, so for\nthis particular fix, it should be OK to base the fix there.\n\n\n"},{"id":"365173","messageId":"20181212133945.GV30222@szeder.dev","threadId":"50011","inReplyTo":"4a22502a318a65f144b3b6542cc5e711a1811c78.1544560544.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/1] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-12-12T13:39:45Z","receivedAt":"2018-12-12T13:39:51Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Tue, Dec 11, 2018 at 12:35:46PM -0800, Derrick Stolee via GitGitGadget wrote:\n> From: Derrick Stolee <dstolee@microsoft.com>\n> \n> The new test_oid machinery in the test library requires reading\n> some information from t/oid-info/hash-info and t/oid-info/oid.\n> The shell logic that reads from these files is sensitive to CRLF\n> line endings, causing a problem when the test suite is run on a\n> Windows machine that converts LF to CRLF.\n\n\"What problem?\" is what people will ask when they read this commit\nmessage in the future.\n\nPlease include the relevant details in the commit message instead of\nthe cover letter.\n\n> Exclude the files in this folder from this conversion.\n> \n> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>\n> ---\n>  .gitattributes | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/.gitattributes b/.gitattributes\n> index acf853e029..3738cea7eb 100644\n> --- a/.gitattributes\n> +++ b/.gitattributes\n> @@ -13,3 +13,4 @@\n>  /Documentation/gitk.txt conflict-marker-size=32\n>  /Documentation/user-manual.txt conflict-marker-size=32\n>  /t/t????-*.sh conflict-marker-size=32\n> +/t/oid-info/* eol=lf\n> -- \n> gitgitgadget\n"},{"id":"365185","messageId":"pull.98.v2.git.gitgitgadget@gmail.com","threadId":"50011","inReplyTo":"pull.98.git.gitgitgadget@gmail.com","subject":"[PATCH v2 0/2] Add more eol=lf to .gitattributes","fromName":"Derrick Stolee via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-12-12T18:14:51Z","receivedAt":"2018-12-12T18:14:54Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"I noticed that our CI builds (see [1] for an example) were returning success\nmuch faster than they did before Git v2.20.0. Turns out that there was a\ntest script failure involving the new test hash logic.\n\nerror: bug in the test script: bad hash algorithm\nmake[1]: *** [Makefile:56: t0000-basic.sh] Error 1\nmake[1]: *** Waiting for unfinished jobs....\n\nThis failure was due to an LF -> CRLF conversion in some data files in\nt/oid-info/. Don't munge these files, and the tests can continue.\n\nUPDATED IN V2: Unfortunately, I didn't check the full test suite after\ngetting beyond this point, and found another LF -> CRLF conversion problem\nin t4256-am-format-flowed.sh due to example patches in t/t4256/1/. Add these\nin a second commit. Thanks, dscho, for helping with the correct placement.\n\nThanks, -Stolee\n\n[1] https://gvfs.visualstudio.com/ci/_build/results?buildId=4815\n\nDerrick Stolee (1):\n  .gitattributes: ensure t/oid-info/* has eol=lf\n\nJohannes Schindelin (1):\n  t4256: mark support files as LF-only\n\n .gitattributes   | 1 +\n t/.gitattributes | 1 +\n 2 files changed, 2 insertions(+)\n\n\nbase-commit: 5d826e972970a784bd7a7bdf587512510097b8c7\nPublished-As: https://github.com/gitgitgadget/git/releases/tags/pr-98%2Fderrickstolee%2Ftest-oid-fix-windows-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-98/derrickstolee/test-oid-fix-windows-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/98\n\nRange-diff vs v1:\n\n 1:  4a22502a31 = 1:  4a22502a31 .gitattributes: ensure t/oid-info/* has eol=lf\n -:  ---------- > 2:  4275b8a581 t4256: mark support files as LF-only\n\n-- \ngitgitgadget\n"},{"id":"365186","messageId":"4a22502a318a65f144b3b6542cc5e711a1811c78.1544638490.git.gitgitgadget@gmail.com","threadId":"50011","inReplyTo":"pull.98.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 1/2] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"Derrick Stolee via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-12-12T18:14:53Z","receivedAt":"2018-12-12T18:14:56Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"From: Derrick Stolee <dstolee@microsoft.com>\n\nThe new test_oid machinery in the test library requires reading\nsome information from t/oid-info/hash-info and t/oid-info/oid.\nThe shell logic that reads from these files is sensitive to CRLF\nline endings, causing a problem when the test suite is run on a\nWindows machine that converts LF to CRLF.\n\nExclude the files in this folder from this conversion.\n\nSigned-off-by: Derrick Stolee <dstolee@microsoft.com>\n---\n .gitattributes | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/.gitattributes b/.gitattributes\nindex acf853e029..3738cea7eb 100644\n--- a/.gitattributes\n+++ b/.gitattributes\n@@ -13,3 +13,4 @@\n /Documentation/gitk.txt conflict-marker-size=32\n /Documentation/user-manual.txt conflict-marker-size=32\n /t/t????-*.sh conflict-marker-size=32\n+/t/oid-info/* eol=lf\n-- \ngitgitgadget\n\n"},{"id":"365187","messageId":"4275b8a5812b7108aecfc027fd6ace9b470a7c88.1544638490.git.gitgitgadget@gmail.com","threadId":"50011","inReplyTo":"pull.98.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 2/2] t4256: mark support files as LF-only","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-12-12T18:14:54Z","receivedAt":"2018-12-12T18:14:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe test t4256-am-format-flowed.sh requires carefully applying a\npatch after ignoring padding whitespace. This breaks if the file\nis munged to include CRLF line endings instead of LF.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Derrick Stolee <dstolee@microsoft.com>\n---\n t/.gitattributes | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/.gitattributes b/t/.gitattributes\nindex e7acedabe1..df05434d32 100644\n--- a/t/.gitattributes\n+++ b/t/.gitattributes\n@@ -16,6 +16,7 @@ t[0-9][0-9][0-9][0-9]/* -whitespace\n /t4135/* eol=lf\n /t4211/* eol=lf\n /t4252/* eol=lf\n+/t4256/1/* eol=lf\n /t5100/* eol=lf\n /t5515/* eol=lf\n /t556x_common eol=lf\n-- \ngitgitgadget\n"},{"id":"365213","messageId":"xmqqva3ygnh3.fsf@gitster-ct.c.googlers.com","threadId":"50011","inReplyTo":"4a22502a318a65f144b3b6542cc5e711a1811c78.1544638490.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 1/2] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-12-13T02:38:32Z","receivedAt":"2018-12-13T02:38:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Derrick Stolee via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Derrick Stolee <dstolee@microsoft.com>\n>\n> The new test_oid machinery in the test library requires reading\n> some information from t/oid-info/hash-info and t/oid-info/oid.\n> The shell logic that reads from these files is sensitive to CRLF\n> line endings, causing a problem when the test suite is run on a\n> Windows machine that converts LF to CRLF.\n>\n> Exclude the files in this folder from this conversion.\n>\n> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>\n> ---\n\nIt seems that this step is identical to v1, to which SZEDER Gábor\nhad trouble with (cf. <20181212133945.GV30222@szeder.dev>).  I am\nguessing that the review and v2 e-mails have crossed.\n\nFWIW, I personally do not think \"is sensitive to CRLF\" is too bad,\nas my attempt to clarify it does not make it much better, e.g.\n\n\tThe logic to read from these files in shell uses built-in\n\t\"read\" command, which leaves CR at the end of these text\n\tfiles when they are checked out with CRLF line endings, at\n\tleast when run with bash shipped with Git for Windows.  This\n\tresults in an unexpected value in the variable these lines\n\tare read into, leading the tests to fail.\n\nSo, I'll keep what I queued when I received v1 for now.\n"},{"id":"365214","messageId":"xmqqr2emgndg.fsf@gitster-ct.c.googlers.com","threadId":"50011","inReplyTo":"4275b8a5812b7108aecfc027fd6ace9b470a7c88.1544638490.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 2/2] t4256: mark support files as LF-only","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-12-13T02:40:43Z","receivedAt":"2018-12-13T02:40:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> The test t4256-am-format-flowed.sh requires carefully applying a\n> patch after ignoring padding whitespace. This breaks if the file\n> is munged to include CRLF line endings instead of LF.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>\n> ---\n\nThanks, will queue.\n\n>  t/.gitattributes | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/t/.gitattributes b/t/.gitattributes\n> index e7acedabe1..df05434d32 100644\n> --- a/t/.gitattributes\n> +++ b/t/.gitattributes\n> @@ -16,6 +16,7 @@ t[0-9][0-9][0-9][0-9]/* -whitespace\n>  /t4135/* eol=lf\n>  /t4211/* eol=lf\n>  /t4252/* eol=lf\n> +/t4256/1/* eol=lf\n>  /t5100/* eol=lf\n>  /t5515/* eol=lf\n>  /t556x_common eol=lf\n"},{"id":"365244","messageId":"nycvar.QRO.7.76.6.1812131358530.43@tvgsbejvaqbjf.bet","threadId":"50011","inReplyTo":"20181212133945.GV30222@szeder.dev","subject":"Re: [PATCH 1/1] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-12-13T13:01:15Z","receivedAt":"2018-12-13T13:01:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Gábor,\n\nOn Wed, 12 Dec 2018, SZEDER Gábor wrote:\n\n> On Tue, Dec 11, 2018 at 12:35:46PM -0800, Derrick Stolee via GitGitGadget wrote:\n> > From: Derrick Stolee <dstolee@microsoft.com>\n> > \n> > The new test_oid machinery in the test library requires reading\n> > some information from t/oid-info/hash-info and t/oid-info/oid.\n> > The shell logic that reads from these files is sensitive to CRLF\n> > line endings, causing a problem when the test suite is run on a\n> > Windows machine that converts LF to CRLF.\n> \n> \"What problem?\" is what people will ask when they read this commit\n> message in the future.\n\nThe test script (not test case) fails with the rather terrifying message\n\n\terror: bug in the test script: bad hash algorithm\n\nSee e.g. line 958 of the Build & Test log in the Windows phase of\nhttps://dev.azure.com/git-for-windows/git/_build/results?buildId=26757\n\nCiao,\nDscho\n\n> Please include the relevant details in the commit message instead of\n> the cover letter.\n> \n> > Exclude the files in this folder from this conversion.\n> > \n> > Signed-off-by: Derrick Stolee <dstolee@microsoft.com>\n> > ---\n> >  .gitattributes | 1 +\n> >  1 file changed, 1 insertion(+)\n> > \n> > diff --git a/.gitattributes b/.gitattributes\n> > index acf853e029..3738cea7eb 100644\n> > --- a/.gitattributes\n> > +++ b/.gitattributes\n> > @@ -13,3 +13,4 @@\n> >  /Documentation/gitk.txt conflict-marker-size=32\n> >  /Documentation/user-manual.txt conflict-marker-size=32\n> >  /t/t????-*.sh conflict-marker-size=32\n> > +/t/oid-info/* eol=lf\n> > -- \n> > gitgitgadget\n> "},{"id":"365247","messageId":"20181213132254.GW30222@szeder.dev","threadId":"50011","inReplyTo":"nycvar.QRO.7.76.6.1812131358530.43@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 1/1] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-12-13T13:22:54Z","receivedAt":"2018-12-13T13:23:02Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Thu, Dec 13, 2018 at 02:01:15PM +0100, Johannes Schindelin wrote:\n> Hi Gábor,\n> \n> On Wed, 12 Dec 2018, SZEDER Gábor wrote:\n> \n> > On Tue, Dec 11, 2018 at 12:35:46PM -0800, Derrick Stolee via GitGitGadget wrote:\n> > > From: Derrick Stolee <dstolee@microsoft.com>\n> > > \n> > > The new test_oid machinery in the test library requires reading\n> > > some information from t/oid-info/hash-info and t/oid-info/oid.\n> > > The shell logic that reads from these files is sensitive to CRLF\n> > > line endings, causing a problem when the test suite is run on a\n> > > Windows machine that converts LF to CRLF.\n> > \n> > \"What problem?\" is what people will ask when they read this commit\n> > message in the future.\n> \n> The test script (not test case) fails with the rather terrifying message\n> \n> \terror: bug in the test script: bad hash algorithm\n> \n> See e.g. line 958 of the Build & Test log in the Windows phase of\n> https://dev.azure.com/git-for-windows/git/_build/results?buildId=26757\n\nYeah, I saw that in the cover letter.  And that was my point, that I\nsaw this there, not in the proposed commit log message:\n\n> > Please include the relevant details in the commit message instead of\n> > the cover letter.\n"},{"id":"365249","messageId":"nycvar.QRO.7.76.6.1812131443500.43@tvgsbejvaqbjf.bet","threadId":"50011","inReplyTo":"20181213132254.GW30222@szeder.dev","subject":"Re: [PATCH 1/1] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-12-13T13:44:16Z","receivedAt":"2018-12-13T13:44:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Gábor,\n\nOn Thu, 13 Dec 2018, SZEDER Gábor wrote:\n\n> On Thu, Dec 13, 2018 at 02:01:15PM +0100, Johannes Schindelin wrote:\n> > \n> > On Wed, 12 Dec 2018, SZEDER Gábor wrote:\n> > \n> > > On Tue, Dec 11, 2018 at 12:35:46PM -0800, Derrick Stolee via GitGitGadget wrote:\n> > > > From: Derrick Stolee <dstolee@microsoft.com>\n> > > > \n> > > > The new test_oid machinery in the test library requires reading\n> > > > some information from t/oid-info/hash-info and t/oid-info/oid.\n> > > > The shell logic that reads from these files is sensitive to CRLF\n> > > > line endings, causing a problem when the test suite is run on a\n> > > > Windows machine that converts LF to CRLF.\n> > > \n> > > \"What problem?\" is what people will ask when they read this commit\n> > > message in the future.\n> > \n> > The test script (not test case) fails with the rather terrifying message\n> > \n> > \terror: bug in the test script: bad hash algorithm\n> > \n> > See e.g. line 958 of the Build & Test log in the Windows phase of\n> > https://dev.azure.com/git-for-windows/git/_build/results?buildId=26757\n> \n> Yeah, I saw that in the cover letter.  And that was my point, that I\n> saw this there, not in the proposed commit log message:\n> \n> > > Please include the relevant details in the commit message instead of\n> > > the cover letter.\n\nOy, oy, oy. I missed that. Where is the coffee.\n\nCiao,\nDscho"},{"id":"365273","messageId":"6d6ca9a2-9245-e5e9-6d7a-e6d3004054bb@gmail.com","threadId":"50011","inReplyTo":"xmqqva3ygnh3.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v2 1/2] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2018-12-13T16:22:26Z","receivedAt":"2018-12-13T16:22:31Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 12/12/2018 9:38 PM, Junio C Hamano wrote:\n> \"Derrick Stolee via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n>> From: Derrick Stolee <dstolee@microsoft.com>\n>>\n>> The new test_oid machinery in the test library requires reading\n>> some information from t/oid-info/hash-info and t/oid-info/oid.\n>> The shell logic that reads from these files is sensitive to CRLF\n>> line endings, causing a problem when the test suite is run on a\n>> Windows machine that converts LF to CRLF.\n>>\n>> Exclude the files in this folder from this conversion.\n>>\n>> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>\n>> ---\n> It seems that this step is identical to v1, to which SZEDER Gábor\n> had trouble with (cf. <20181212133945.GV30222@szeder.dev>).  I am\n> guessing that the review and v2 e-mails have crossed.\n>\n> FWIW, I personally do not think \"is sensitive to CRLF\" is too bad,\n> as my attempt to clarify it does not make it much better, e.g.\n>\n> \tThe logic to read from these files in shell uses built-in\n> \t\"read\" command, which leaves CR at the end of these text\n> \tfiles when they are checked out with CRLF line endings, at\n> \tleast when run with bash shipped with Git for Windows.  This\n> \tresults in an unexpected value in the variable these lines\n> \tare read into, leading the tests to fail.\n>\n> So, I'll keep what I queued when I received v1 for now.\n\nSorry for missing the edit to the message. You are correct that v2 just \nadded one commit.\n\nI like your rewording, if you feel like editing it.\n\nThanks,\n\n-Stolee\n\n"},{"id":"365314","messageId":"20181214005101.GT890086@genre.crustytoothpaste.net","threadId":"50011","inReplyTo":"4a22502a318a65f144b3b6542cc5e711a1811c78.1544638490.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 1/2] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2018-12-14T00:51:02Z","receivedAt":"2018-12-14T00:51:11Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Wed, Dec 12, 2018 at 10:14:53AM -0800, Derrick Stolee via GitGitGadget wrote:\n> From: Derrick Stolee <dstolee@microsoft.com>\n> \n> The new test_oid machinery in the test library requires reading\n> some information from t/oid-info/hash-info and t/oid-info/oid.\n> The shell logic that reads from these files is sensitive to CRLF\n> line endings, causing a problem when the test suite is run on a\n> Windows machine that converts LF to CRLF.\n> \n> Exclude the files in this folder from this conversion.\n> \n> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>\n> ---\n>  .gitattributes | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/.gitattributes b/.gitattributes\n> index acf853e029..3738cea7eb 100644\n> --- a/.gitattributes\n> +++ b/.gitattributes\n> @@ -13,3 +13,4 @@\n>  /Documentation/gitk.txt conflict-marker-size=32\n>  /Documentation/user-manual.txt conflict-marker-size=32\n>  /t/t????-*.sh conflict-marker-size=32\n> +/t/oid-info/* eol=lf\n\nYeah, this seems like a sensible thing to do. I assumed the shell on\nWindows would read data as text files, not as binary files. It's kinda\nhard for me as a non-Windows user to predict what will need CRLF endings\nand what will need LF endings with Git on Windows.\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"365318","messageId":"xmqqbm5oethq.fsf@gitster-ct.c.googlers.com","threadId":"50011","inReplyTo":"6d6ca9a2-9245-e5e9-6d7a-e6d3004054bb@gmail.com","subject":"Re: [PATCH v2 1/2] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-12-14T02:23:45Z","receivedAt":"2018-12-14T02:23:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Derrick Stolee <stolee@gmail.com> writes:\n\n>> FWIW, I personally do not think \"is sensitive to CRLF\" is too bad,\n>> as my attempt to clarify it does not make it much better, e.g.\n>>\n>> \tThe logic to read from these files in shell uses built-in\n>> \t\"read\" command, which leaves CR at the end of these text\n>> \tfiles when they are checked out with CRLF line endings, at\n>> \tleast when run with bash shipped with Git for Windows.  This\n>> \tresults in an unexpected value in the variable these lines\n>> \tare read into, leading the tests to fail.\n>>\n>> So, I'll keep what I queued when I received v1 for now.\n>\n> Sorry for missing the edit to the message. You are correct that v2\n> just added one commit.\n>\n> I like your rewording, if you feel like editing it.\n\nI'm kinda neutral ;-).\n"},{"id":"365344","messageId":"nycvar.QRO.7.76.6.1812141204040.43@tvgsbejvaqbjf.bet","threadId":"50011","inReplyTo":"20181214005101.GT890086@genre.crustytoothpaste.net","subject":"Re: [PATCH v2 1/2] .gitattributes: ensure t/oid-info/* has eol=lf","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-12-14T11:10:57Z","receivedAt":"2018-12-14T11:11:28Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Brian,\n\nOn Fri, 14 Dec 2018, brian m. carlson wrote:\n\n> On Wed, Dec 12, 2018 at 10:14:53AM -0800, Derrick Stolee via GitGitGadget wrote:\n> > \n> > diff --git a/.gitattributes b/.gitattributes\n> > index acf853e029..3738cea7eb 100644\n> > --- a/.gitattributes\n> > +++ b/.gitattributes\n> > @@ -13,3 +13,4 @@\n> >  /Documentation/gitk.txt conflict-marker-size=32\n> >  /Documentation/user-manual.txt conflict-marker-size=32\n> >  /t/t????-*.sh conflict-marker-size=32\n> > +/t/oid-info/* eol=lf\n> \n> Yeah, this seems like a sensible thing to do. I assumed the shell on\n> Windows would read data as text files, not as binary files.\n\nThis is a tricky thing right there. The Bash we use is  borrowed from the\nMSYS2 project, which tries to stay as close to Unix/Linux as possible,\ni.e. it does *not* treat Carriage Return as part of the line ending.\nChanging that default would break tons of things, I would expect.\n\n> It's kinda hard for me as a non-Windows user to predict what will need\n> CRLF endings and what will need LF endings with Git on Windows.\n\nRight. It is my hope that I get the Azure Pipelines support going soon, so\nthat Pull Requests on GitHub are tested on Windows, too. Hopefully that\nwould help.\n\nTypically, I monitor the Windows builds of `pu` closely. But in this case,\nit did not catch because the current Azure Pipeline that runs these tests\n(triggered via Travis) specifically forces `core.autocrlf` to `false`, as\nthat definition pre-dates the work I've done to make Git's source code\nCR/LF safe.\n\nI do have a build definition to test with `core.autocrlf = true`, but that\nonly runs on Git for Windows' `master`, and once git.git has its own Azure\nPipeline, I plan on adding another phase to test that directly.\n\nCiao,\nDscho\n"}]}