{"thread":{"id":"57241","subject":"Test failure on Windows in t3705-add-sparse-checkout.sh","startedAt":"2022-01-13T21:12:13Z","lastAt":"2022-01-18T16:17:32Z","messageCount":4,"participants":["Johannes Sixt","Elijah Newren","Derrick Stolee"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"446183","messageId":"7ed402e0-63cd-2875-b3ac-71c967ccf80a@kdbg.org","threadId":"57241","inReplyTo":null,"subject":"Test failure on Windows in t3705-add-sparse-checkout.sh","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2022-01-13T21:12:08Z","receivedAt":"2022-01-13T21:12:13Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Hi Stolee,\n\nis there a reason we don't do this in the test case that you added in\n63b60b3add75 (\"add: update --chmod to skip sparse paths\", 2021-09-24).\nNotice that the similar git add earlier also sets core.autocrlf. As the\ncomment indicates, stderr indeed contains a warning about LF->CRLF\nconversion in my Windows build and fails test_must_be_empty.\n\ndiff --git a/t/t3705-add-sparse-checkout.sh b/t/t3705-add-sparse-checkout.sh\nindex 81f3384eee..4fb663e3b4 100755\n--- a/t/t3705-add-sparse-checkout.sh\n+++ b/t/t3705-add-sparse-checkout.sh\n@@ -181,13 +181,13 @@ test_expect_success 'git add fails outside of sparse-checkout definition' '\n \t# Avoid munging CRLFs to avoid an error message\n \tgit -c core.autocrlf=input add --sparse sparse_entry 2>stderr &&\n \ttest_must_be_empty stderr &&\n \tgit ls-files --stage >actual &&\n \tgrep \"^100644 .*sparse_entry\\$\" actual &&\n \n-\tgit add --sparse --chmod=+x sparse_entry 2>stderr &&\n+\tgit -c core.autocrlf=input add --sparse --chmod=+x sparse_entry 2>stderr &&\n \ttest_must_be_empty stderr &&\n \tgit ls-files --stage >actual &&\n \tgrep \"^100755 .*sparse_entry\\$\" actual &&\n \n \tgit reset &&\n \n\n"},{"id":"446293","messageId":"df42170b-8659-d496-3454-a4a3ac2827eb@kdbg.org","threadId":"57241","inReplyTo":"7ed402e0-63cd-2875-b3ac-71c967ccf80a@kdbg.org","subject":"[PATCH] t3705-add-sparse-checkout: ignore a LF->CRLF warning on Windows","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2022-01-15T14:58:41Z","receivedAt":"2022-01-15T14:58:45Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"There are checks that certain `git add` invocations do not produce\noutput on stderr. One of them, the original one, uses\n\"-c core.autocrlf=input\" to ensure that `git add` does not write a\nhint about LF to CRLF conversion to stderr on Windows. A second\n`git add` was added in later patch, but it was forgotten to add\nthe same protection. Add it now to let the test pass on Windows.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\nAm 13.01.22 um 22:12 schrieb Johannes Sixt:\n> is there a reason we don't do this in the test case that you added in\n> 63b60b3add75 (\"add: update --chmod to skip sparse paths\", 2021-09-24).\n> Notice that the similar git add earlier also sets core.autocrlf.\n\nHere's a proper patch.\n\n t/t3705-add-sparse-checkout.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t3705-add-sparse-checkout.sh b/t/t3705-add-sparse-checkout.sh\nindex 81f3384eee..4fb663e3b4 100755\n--- a/t/t3705-add-sparse-checkout.sh\n+++ b/t/t3705-add-sparse-checkout.sh\n@@ -184,7 +184,7 @@ test_expect_success 'git add fails outside of sparse-checkout definition' '\n \tgit ls-files --stage >actual &&\n \tgrep \"^100644 .*sparse_entry\\$\" actual &&\n \n-\tgit add --sparse --chmod=+x sparse_entry 2>stderr &&\n+\tgit -c core.autocrlf=input add --sparse --chmod=+x sparse_entry 2>stderr &&\n \ttest_must_be_empty stderr &&\n \tgit ls-files --stage >actual &&\n \tgrep \"^100755 .*sparse_entry\\$\" actual &&\n-- \n2.34.1.141.g867d0e9267\n"},{"id":"446302","messageId":"CABPp-BF_fEN+2Q9kbSgc4mw3Ni4wPKDRut+MmWS3XpK-QtWtBQ@mail.gmail.com","threadId":"57241","inReplyTo":"7ed402e0-63cd-2875-b3ac-71c967ccf80a@kdbg.org","subject":"Re: Test failure on Windows in t3705-add-sparse-checkout.sh","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2022-01-16T03:58:32Z","receivedAt":"2022-01-16T03:58:58Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Fri, Jan 14, 2022 at 12:30 AM Johannes Sixt <j6t@kdbg.org> wrote:\n>\n> Hi Stolee,\n>\n> is there a reason we don't do this in the test case that you added in\n> 63b60b3add75 (\"add: update --chmod to skip sparse paths\", 2021-09-24).\n> Notice that the similar git add earlier also sets core.autocrlf. As the\n> comment indicates, stderr indeed contains a warning about LF->CRLF\n> conversion in my Windows build and fails test_must_be_empty.\n>\n> diff --git a/t/t3705-add-sparse-checkout.sh b/t/t3705-add-sparse-checkout.sh\n> index 81f3384eee..4fb663e3b4 100755\n> --- a/t/t3705-add-sparse-checkout.sh\n> +++ b/t/t3705-add-sparse-checkout.sh\n> @@ -181,13 +181,13 @@ test_expect_success 'git add fails outside of sparse-checkout definition' '\n>         # Avoid munging CRLFs to avoid an error message\n>         git -c core.autocrlf=input add --sparse sparse_entry 2>stderr &&\n>         test_must_be_empty stderr &&\n>         git ls-files --stage >actual &&\n>         grep \"^100644 .*sparse_entry\\$\" actual &&\n>\n> -       git add --sparse --chmod=+x sparse_entry 2>stderr &&\n> +       git -c core.autocrlf=input add --sparse --chmod=+x sparse_entry 2>stderr &&\n>         test_must_be_empty stderr &&\n>         git ls-files --stage >actual &&\n>         grep \"^100755 .*sparse_entry\\$\" actual &&\n>\n>         git reset &&\n\nIs this an alternative fix for the same failure I was seeing in t3705\nand which I was confused why I had to add to my series over at\nhttps://lore.kernel.org/git/11d46a399d26c913787b704d2b7169cafc28d639.1642175983.git.gitgitgadget@gmail.com/\n?\n"},{"id":"446428","messageId":"ea4cc086-744b-6fe5-08be-7a9c684da1a3@gmail.com","threadId":"57241","inReplyTo":"df42170b-8659-d496-3454-a4a3ac2827eb@kdbg.org","subject":"Re: [PATCH] t3705-add-sparse-checkout: ignore a LF->CRLF warning on Windows","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2022-01-18T16:17:00Z","receivedAt":"2022-01-18T16:17:32Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 1/15/2022 9:58 AM, Johannes Sixt wrote:\n> There are checks that certain `git add` invocations do not produce\n> output on stderr. One of them, the original one, uses\n> \"-c core.autocrlf=input\" to ensure that `git add` does not write a\n> hint about LF to CRLF conversion to stderr on Windows. A second\n> `git add` was added in later patch, but it was forgotten to add\n> the same protection. Add it now to let the test pass on Windows.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n> Am 13.01.22 um 22:12 schrieb Johannes Sixt:\n>> is there a reason we don't do this in the test case that you added in\n>> 63b60b3add75 (\"add: update --chmod to skip sparse paths\", 2021-09-24).\n>> Notice that the similar git add earlier also sets core.autocrlf.\n> \n> Here's a proper patch.\n\nThanks for this fix. I'm not sure why this fails on your Windows\nmachine but passes the Windows CI builds. Glad to have the fix\neither way.\n> -\tgit add --sparse --chmod=+x sparse_entry 2>stderr &&\n> +\tgit -c core.autocrlf=input add --sparse --chmod=+x sparse_entry 2>stderr &&\n\nThanks,\n-Stolee\n"}]}