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
Patrick Steinhardt <ps@pks.im>
Date
Apr 2, 2026, 05:44 UTC
Message-ID
<ac4CVegAlxdf0zHq@pks.im>
In-Reply-To
<CAPig+cQHUk5abmc+CeJ0tPWs5z7XMq9AxHKZRdvEgULF4zTg0g@mail.gmail.com>
On Wed, Apr 01, 2026 at 12:21:41PM -0400, Eric Sunshine wrote:
Show 41 quoted lines
> On Wed, Apr 1, 2026 at 6:59 AM Patrick Steinhardt <ps@pks.im> wrote:
> > 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
>     ...

True indeed. I'll just add a short comment to the individual callsites. Thanks!

Patrick
Previous: Eric SunshineNext: Patrick Steinhardt
Message 4 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.