Re: [PATCH] trailers: stop recognizing URLs as trailers
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Aug 20, 2026, 14:47 UTC
- Message-ID
- <c097cc44-3033-4f22-8c48-859de8353f99@app.fastmail.com>
- In-Reply-To
- <xmqqcxvcuaak.fsf@gitster.g>
On Thu, Aug 20, 2026, at 16:38, Junio C Hamano wrote:
Show 14 quoted lines
> kristofferhaugsbakk@fastmail.com writes: > >> From: Kristoffer Haugsbakk <code@khaugsbakk.name> >> >> An HTTPS URL starts with an alphanumeric scheme followed by a colon. >> That means that they will be recognized as trailers in a trailer block. >> That turns out to be a problem in practice. Let’s stop recognizing these >> as trailers by failing the trailer parsing when we: >> ... >> Helped-by: Jeff King <peff@peff.net> >> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> > > This has been on hold waiting for the base topic to settle, but now > that the base topic has graduated, the effort can be rebooted.
Thanks!
> Can somebody summarize the outstanding issues on this topic (if > any)?
I have version 2 ready. The only code change is using `starts_with` like Peff mentioned. What I wrote about the changes:
• Use `starts_with` for readability:
https://lore.kernel.org/git/20260609004340.GF358144@coredump.intra.peff.net/T/#m74203c474c34f1028a7e3d389ff46fb7e579444c
• Explain in the commit message that you can technically get false positive
“URL” start fragments:https://lore.kernel.org/git/20260609004340.GF358144@coredump.intra.peff.net/T/#m35047d5c7a79abd23c11f97e6b6a0364409805e3
I just have to dust it off.