From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: [PATCH] t5551: fix quoting in curl version bug prereq
Date: Tue, 6 Oct 2026 11:16:25 +0200 (CEST) [thread overview]
Message-ID: <4526e397-734e-d378-bb1d-31dd969c90ea@gmx.de> (raw)
In-Reply-To: <20261006034331.GA1325722@coredump.intra.peff.net>
Hi Jeff,
On Mon, 5 Oct 2026, Jeff King wrote:
> On Thu, Sep 24, 2026 at 08:53:49PM +0000, Johannes Schindelin via GitGitGadget wrote:
>
> > +# The cURL version which Debian 12 ships (v7.88.1) can fail to retry
> > +# authentication after an early HTTP/2 response. This bug was introduced
> > +# in cURL v7.88.0 (8c762f5998 (http2: minor buffer and error path fixes,
> > +# 2023-02-08)) and fixed in v8.3.0 (https://github.com/curl/curl/pull/11756).
> > +test_lazy_prereq HAVE_CURL_HTTP2_BUG "
> > + test_have_prereq HTTP2 &&
> > + build_option libcurl |
> > + awk -F. '
> > + ($1 == 7 && $2 >= 88) || ($1 == 8 && $2 < 3) { broken = 1 }
> > + END { exit !broken }
> > + '
> > +"
>
> Doh, this is totally broken. The prereq snippet is in double-quotes, so
> the $1, etc in the awk invocation are interpolated before we even eval
> it.
True, I'm sorry.
> [...]
>
> Since I know we both used GPT to work on this, I was curious if this
> slipped past it. Doesn't look like it from what I sent (which used
> option 2 above). I wonder if your agent flipped it, or if you saw how
> ugly it was and flipped it yourself. Not blaming, but it's just a funny
> and interesting data point if a human second-guessing the AI output
> introduced a bug.
I introduced that bug; I meant to double-check the quoting, saw the
single-quote characters, and that's where I stopped.
FWIW my preference would have been to move the entire code into its own
shell function, like so:
-- snip --
curl_has_http2_bug () {
test_have_prereq HTTP2 &&
build_option libcurl |
awk -F. '
($1 == 7 && $2 >= 88) || ($1 == 8 && $2 < 3) { broken = 1 }
END { exit !broken }
'
}
test_lazy_prereq HAVE_CURL_HTTP2_BUG curl_has_http2_bug
-- snap --
Ciao,
Johannes
>
> t/t5551-http-fetch-smart.sh | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
> index f66d7ce7ac..cb681e644f 100755
> --- a/t/t5551-http-fetch-smart.sh
> +++ b/t/t5551-http-fetch-smart.sh
> @@ -21,14 +21,14 @@ start_httpd
> # authentication after an early HTTP/2 response. This bug was introduced
> # in cURL v7.88.0 (8c762f5998 (http2: minor buffer and error path fixes,
> # 2023-02-08)) and fixed in v8.3.0 (https://github.com/curl/curl/pull/11756).
> -test_lazy_prereq HAVE_CURL_HTTP2_BUG "
> +test_lazy_prereq HAVE_CURL_HTTP2_BUG '
> test_have_prereq HTTP2 &&
> build_option libcurl |
> - awk -F. '
> + awk -F. '\''
> ($1 == 7 && $2 >= 88) || ($1 == 8 && $2 < 3) { broken = 1 }
> END { exit !broken }
> - '
> -"
> + '\''
> +'
>
> test_expect_success HTTP2 'enable client-side http/2' '
> git config --global http.version HTTP/2
> --
> 2.56.0.399.g9e0ddc9b37
>
>
>
next prev parent reply other threads:[~2026-10-06 9:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 23:06 [PATCH] ci: work around Debian 12's HTTP/2 authentication failures Johannes Schindelin via GitGitGadget
2026-09-23 16:16 ` Junio C Hamano
2026-09-23 16:47 ` Jeff King
2026-09-23 16:53 ` Jeff King
2026-09-23 16:59 ` Jeff King
2026-09-23 17:17 ` Junio C Hamano
2026-09-23 19:25 ` Jeff King
2026-09-24 18:59 ` Johannes Schindelin
2026-09-24 19:42 ` Junio C Hamano
2026-09-24 23:22 ` Jeff King
2026-09-24 20:53 ` [PATCH v2] " Johannes Schindelin via GitGitGadget
2026-10-06 3:43 ` [PATCH] t5551: fix quoting in curl version bug prereq Jeff King
2026-10-06 3:52 ` [PATCH 2/1] test-lib: allow lazy prerequisite snippets as here-docs Jeff King
2026-10-06 9:16 ` Johannes Schindelin [this message]
2026-10-06 12:25 ` [PATCH] t5551: fix quoting in curl version bug prereq Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4526e397-734e-d378-bb1d-31dd969c90ea@gmx.de \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox