git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Test failure on Windows in t3705-add-sparse-checkout.sh

From
Elijah Newren <newren@gmail.com>
Date
Jan 16, 2022, 03:58 UTC
Message-ID
<CABPp-BF_fEN+2Q9kbSgc4mw3Ni4wPKDRut+MmWS3XpK-QtWtBQ@mail.gmail.com>
In-Reply-To
<7ed402e0-63cd-2875-b3ac-71c967ccf80a@kdbg.org>
On Fri, Jan 14, 2022 at 12:30 AM Johannes Sixt <j6t@kdbg.org> wrote:
Show 27 quoted lines
>
> Hi Stolee,
>
> is there a reason we don't do this in the test case that you added in
> 63b60b3add75 ("add: update --chmod to skip sparse paths", 2021-09-24).
> Notice that the similar git add earlier also sets core.autocrlf. As the
> comment indicates, stderr indeed contains a warning about LF->CRLF
> conversion in my Windows build and fails test_must_be_empty.
>
> diff --git a/t/t3705-add-sparse-checkout.sh b/t/t3705-add-sparse-checkout.sh
> index 81f3384eee..4fb663e3b4 100755
> --- a/t/t3705-add-sparse-checkout.sh
> +++ b/t/t3705-add-sparse-checkout.sh
> @@ -181,13 +181,13 @@ test_expect_success 'git add fails outside of sparse-checkout definition' '
>         # Avoid munging CRLFs to avoid an error message
>         git -c core.autocrlf=input add --sparse sparse_entry 2>stderr &&
>         test_must_be_empty stderr &&
>         git ls-files --stage >actual &&
>         grep "^100644 .*sparse_entry\$" actual &&
>
> -       git add --sparse --chmod=+x sparse_entry 2>stderr &&
> +       git -c core.autocrlf=input add --sparse --chmod=+x sparse_entry 2>stderr &&
>         test_must_be_empty stderr &&
>         git ls-files --stage >actual &&
>         grep "^100755 .*sparse_entry\$" actual &&
>
>         git reset &&

Is this an alternative fix for the same failure I was seeing in t3705 and which I was confused why I had to add to my series over at https://lore.kernel.org/git/11d46a399d26c913787b704d2b7169cafc28d639.1642175983.git.gitgitgadget@gmail.com/ ?

Previous: Derrick Stolee
Message 4 of 4 in “Test failure on Windows in t3705-add-sparse-checkout.sh”
  1. Johannes SixtJan 13, 2022
  2. t3705-add-sparse-checkout: ignore a LF->CRLF warning on WindowsJohannes Sixt, Jan 15, 2022
  3. Derrick StoleeJan 18, 2022
  4. Elijah NewrenJan 16, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.