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

Re: [PATCH v5 3/3] bundle-uri: do not die on unresolvable relative URIs

From
AGAniket Gupta <aniketgupta3001@gmail.com>
Date
Dec 1, 2026, 15:43 UTC
Message-ID
<20261201154338.51613-1-aniketgupta3001@gmail.com>
In-Reply-To
<aw6--STmep1UZ3qy@pks.im>
> This is now weirdly inconsistent. [...]

I had added the removal in v5 because of Junio's v4 review. A bad URI left an entry without a uri in the map. For a list that a server advertises, the clone then reported the same bundle a second time, as having no uri. The check for a missing value didnt come from me though... it landed upstream while v4 was in review ("bundle-uri: handle NULL values in bundle lists"). It cannot cause the second error: a line without a value in the server's advertisement is rejected earlier, and a list file with one is rejected as a whole. I agree that it reads oddly that the 2 cases differ. How about I drop the bundle in both in v6?

> This change also raises the question why we error on a broken URI, but
> not on a broken creation token. Maybe the creation token isn't needed?

I did not change how the creation token is handled, and a broken one warns like before. It is needed for the creationToken heuristic and a bundle with token 0 gets skipped. Making it an error feels like a separate change... how about we leave it?

> In any case, this could have been avoided if we add the entry to the
> map at the end of the function, only, after we have parsed everything.

I tested this. The function only sees one key at a time. If another key of the same bundle, for eg creationToken, comes first, the entry is already in the map. Adding it last fixes the case where the bad uri comes first, but if creationToken comes first the clone still prints "bundle '<id>' has no uri". It made sense to keep the removal.

Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 29 of 37 in “bundle-uri: do not die on unresolvable relative URIs”
  1. 0/3 bundle-uri: do not die on unresolvable relative URIsAniket Gupta, Nov 5, 2026
  2. 1/3 remote: add relative_url_gently()Aniket Gupta, Nov 5, 2026
  3. Derrick StoleeNov 6, 2026
  4. 2/3 remote: do not show credentials when relative_url() failsAniket Gupta, Nov 5, 2026
  5. Derrick StoleeNov 6, 2026
  6. Junio C HamanoNov 6, 2026
  7. Aniket GuptaNov 9, 2026
  8. 3/3 bundle-uri: do not die on unresolvable relative URIsAniket Gupta, Nov 5, 2026
  9. Derrick StoleeNov 6, 2026
  10. Derrick StoleeNov 6, 2026
  11. Aniket GuptaNov 6, 2026
  12. Patrick SteinhardtNov 9, 2026
  13. Aniket GuptaNov 9, 2026
  14. 0/3 bundle-uri: do not die on unresolvable relative URIsAniket Gupta, Nov 23, 2026
  15. 1/3 remote: add relative_url_gently()Aniket Gupta, Nov 23, 2026
  16. 2/3 remote: name the original URL when relative_url() failsAniket Gupta, Nov 23, 2026
  17. 3/3 bundle-uri: do not die on unresolvable relative URIsAniket Gupta, Nov 23, 2026
  18. Junio C HamanoNov 23, 2026
  19. Aniket GuptaNov 23, 2026
  20. Derrick StoleeNov 23, 2026
  21. 0/3 bundle-uri: do not die on unresolvable relative URIsAniket Gupta, Nov 26, 2026
  22. 1/3 remote: add relative_url_gently()Aniket Gupta, Nov 26, 2026
  23. 2/3 remote: name the original URL when relative_url() failsAniket Gupta, Nov 26, 2026
  24. Patrick SteinhardtDec 1, 2026
  25. Aniket GuptaDec 1, 2026
  26. 3/3 bundle-uri: do not die on unresolvable relative URIsAniket Gupta, Nov 26, 2026
  27. Derrick StoleeNov 30, 2026
  28. Patrick SteinhardtDec 1, 2026
  29. Aniket GuptaDec 1, 2026
  30. Patrick SteinhardtDec 2, 2026
  31. Patrick SteinhardtDec 1, 2026
  32. Aniket GuptaDec 1, 2026
  33. 0/3 bundle-uri: do not die on unresolvable relative URIsAniket Gupta, Dec 2, 2026
  34. 1/3 remote: add relative_url_gently()Aniket Gupta, Dec 2, 2026
  35. 2/3 remote: name the original URL when relative_url() failsAniket Gupta, Dec 2, 2026
  36. 3/3 bundle-uri: do not die on unresolvable relative URIsAniket Gupta, Dec 2, 2026
  37. Patrick SteinhardtDec 3, 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.