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

Re: [PATCH 1/2] t: work around multibyte bug in quoted heredocs with Dash v0.5.13

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Apr 1, 2026, 16:21 UTC
Message-ID
<CAPig+cQHUk5abmc+CeJ0tPWs5z7XMq9AxHKZRdvEgULF4zTg0g@mail.gmail.com>
In-Reply-To
<20260401-pks-tests-with-dash-v1-1-d70b5040aa5d@pks.im>
On Wed, Apr 1, 2026 at 6:59 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 18 quoted lines
> When executing our test suite with Dash v0.5.13.2 one can observe
> several test failures that all have the same symptoms: we have a quoted
> heredoc that contains multibyte characters, but the final data does not
> match what we actually wanted to write. One such example is in t0300,
> where we see the diffs like the following:
> [...]
> For now, work around the bug by using unquoted heredocs instead.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
> diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh
> @@ -675,7 +675,7 @@ test_expect_success 'match percent-encoded values' '
>  test_expect_success 'match percent-encoded UTF-8 values in path' '
>         test_config credential.https://example.com.useHttpPath true &&
>         test_config credential.https://example.com/perú.git.helper "$HELPER" &&
> -       check fill <<-\EOF
> +       check fill <<-EOF
>         url=https://example.com/per%C3%BA.git

Oof, this is the sort of change which cries out for an in-code comment, since we can't expect that future reviewers will remember this specific workaround in this specific script, and we can't expect that people working on this code will think to check the history to learn why the heredoc is unquoted. Without such a comment, someone working on this file for some purpose or another (or even a GSoC applicant looking for a microproject) will come along and "modernize" this script by adding back the heredoc quoting which this patch removes.

To prevent someone from "breaking" your "fix", at minimum, please add an explanatory comment somewhere near the top of the script which pretty much duplicates the information from the commit message:

    # *DONTQUOTE*: ...explanation of dash bug ...
and reference that comment at each location you "fix":
    # NOTE: Don't quote heredoc; see *DONTQUOTE* above.
    check fill <<-EOF
    ...
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 3 of 10 in “t: work around bugs in Dash v0.5.13”
  1. 0/2 t: work around bugs in Dash v0.5.13Patrick Steinhardt, Apr 1, 2026
  2. 1/2 t: work around multibyte bug in quoted heredocs with Dash v0.5.13Patrick Steinhardt, Apr 1, 2026
  3. Eric SunshineApr 1, 2026
  4. Patrick SteinhardtApr 2, 2026
  5. 2/2 t9300: work around partial read bug in Dash v0.5.13Patrick Steinhardt, Apr 1, 2026
  6. 0/2 t: work around bugs in Dash v0.5.13Patrick Steinhardt, Apr 2, 2026
  7. 1/2 t: work around multibyte bug in quoted heredocs with Dash v0.5.13Patrick Steinhardt, Apr 2, 2026
  8. parser: Fix multi-byte output in here-doc with quoted delimiterHerbert Xu, May 7, 2026
  9. Herbert XuMay 7, 2026
  10. 2/2 t9300: work around partial read bug in Dash v0.5.13Patrick Steinhardt, Apr 2, 2026

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.