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

Re: trailers: --only-trailers normalizes URLs to trailers

From
Jeff King <peff@peff.net>
Date
Jun 11, 2026, 06:56 UTC
Message-ID
<20260611065616.GE2191159@coredump.intra.peff.net>
In-Reply-To
<d8f7f827-27da-41fc-af8d-72d383b24fff@app.fastmail.com>
On Wed, Jun 10, 2026 at 04:21:29PM +0200, Kristoffer Haugsbakk wrote:
Show 10 quoted lines
> > Yeah, though if you'll allow me to nitpick your subject a moment: I
> > don't think --only-trailers is really the culprit here. It demonstrates
> > the problem because it normalizes the "trailer" it found. But the loose
> > trailer matching is the more fundamental issue. For example:
> >
> >[snip]
> 
> Yeah, this is more precise. I focused a ton on the normalized output
> because that’s what makes it obvious. But the fundamental problem is
> interpreting URLs like trailers.

That makes sense. As the author of --only-trailers I immediately wondered if I had introduced a bug in it, so I was partially motivated by exonerating myself. ;) I agree that using it is the simplest way to demonstrate the problem.

Show 14 quoted lines
> > Agreed, though I think a rule like: ":// (with no whitespace)" is not a
> > valid separator. Something like this:
> 
> Yes, matching on `://` strictly is a better proposal. No need to care
> about `http`, `https`, `file`, etc. And both of these would *still* have
> to be true for this change to be a false negative w.r.t. the user’s
> intentions:
> 
> • They really input a trailer that looks like a URL, but it’s not meant
>   to be a URL
> • They really wanted the value to start with `//`
> 
> And again I don’t think that is likely to ever happen (with a knock
> on wood).

I didn't spend much effort on the patch I showed beyond running it once. It would probably need tests and a doc update. I wasn't planning to run with it, but if you feel like doing so, please feel free to use it as you like.

-Peff
Previous: Kristoffer HaugsbakkNext: Kristoffer Haugsbakk
Message 4 of 18 in “trailers: --only-trailers normalizes URLs to trailers”
  1. Kristoffer HaugsbakkJun 4, 2026
  2. Jeff KingJun 9, 2026
  3. Kristoffer HaugsbakkJun 10, 2026
  4. Jeff KingJun 11, 2026
  5. Kristoffer HaugsbakkJun 11, 2026
  6. trailers: stop recognizing URLs as trailerskristofferhaugsbakk@fastmail.com, Aug 2, 2026
  7. Junio C HamanoAug 2, 2026
  8. Kristoffer HaugsbakkAug 3, 2026
  9. Jeff KingAug 3, 2026
  10. Junio C HamanoAug 3, 2026
  11. Kristoffer HaugsbakkAug 6, 2026
  12. Junio C HamanoAug 20, 2026
  13. Kristoffer HaugsbakkAug 20, 2026
  14. Jeff KingAug 21, 2026
  15. trailers: stop recognizing URLs as trailerskristofferhaugsbakk@fastmail.com, Aug 20, 2026
  16. trailers: stop recognizing URLs as trailerskristofferhaugsbakk@fastmail.com, Aug 21, 2026
  17. Kristoffer HaugsbakkAug 21, 2026
  18. Junio C HamanoAug 21, 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.