Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Aniket Gupta <aniketgupta3001@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Derrick Stolee <stolee@gmail.com>
Subject: Re: [PATCH v5 3/3] bundle-uri: do not die on unresolvable relative URIs
Date: Wed, 2 Dec 2026 12:10:02 +0100	[thread overview]
Message-ID: <aw_8dyuhRs6DfMTp@pks.im> (raw)
In-Reply-To: <20261201154338.51613-1-aniketgupta3001@gmail.com>

On Tue, Dec 01, 2026 at 09:13:38PM +0530, Aniket Gupta wrote:
> > 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?

I think that would make more sense indeed.

> > 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?

I'm fine with that.

> > 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.

Ah, that makes sense.

Thanks!

Patrick

  reply	other threads:[~2026-12-02 11:10 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 15:28 [PATCH v3 0/3] bundle-uri: do not die on unresolvable relative URIs Aniket Gupta
2026-11-05 15:28 ` [PATCH v3 1/3] remote: add relative_url_gently() Aniket Gupta
2026-11-06 14:36   ` Derrick Stolee
2026-11-05 15:28 ` [PATCH v3 2/3] remote: do not show credentials when relative_url() fails Aniket Gupta
2026-11-06 14:43   ` Derrick Stolee
2026-11-06 19:15     ` Junio C Hamano
2026-11-09 10:39     ` Aniket Gupta
2026-11-05 15:28 ` [PATCH v3 3/3] bundle-uri: do not die on unresolvable relative URIs Aniket Gupta
2026-11-06 14:51   ` Derrick Stolee
2026-11-06 14:57 ` [PATCH v3 0/3] " Derrick Stolee
2026-11-06 17:25   ` Aniket Gupta
2026-11-09  9:26     ` Patrick Steinhardt
2026-11-09 10:56       ` Aniket Gupta
2026-11-23  6:44 ` [PATCH v4 " Aniket Gupta
2026-11-23  6:44   ` [PATCH v4 1/3] remote: add relative_url_gently() Aniket Gupta
2026-11-23  6:44   ` [PATCH v4 2/3] remote: name the original URL when relative_url() fails Aniket Gupta
2026-11-23  6:44   ` [PATCH v4 3/3] bundle-uri: do not die on unresolvable relative URIs Aniket Gupta
2026-11-23 21:04     ` Junio C Hamano
2026-11-23 22:25       ` Aniket Gupta
2026-11-23 14:54   ` [PATCH v4 0/3] " Derrick Stolee
2026-11-26 11:58 ` [PATCH v5 " Aniket Gupta
2026-11-26 11:58   ` [PATCH v5 1/3] remote: add relative_url_gently() Aniket Gupta
2026-11-26 11:58   ` [PATCH v5 2/3] remote: name the original URL when relative_url() fails Aniket Gupta
2026-12-01 12:35     ` Patrick Steinhardt
2026-12-01 14:58       ` Aniket Gupta
2026-11-26 11:58   ` [PATCH v5 3/3] bundle-uri: do not die on unresolvable relative URIs Aniket Gupta
2026-11-30 19:11     ` Derrick Stolee
2026-12-01 12:35     ` Patrick Steinhardt
2026-12-01 15:43       ` Aniket Gupta
2026-12-02 11:10         ` Patrick Steinhardt [this message]
2026-12-01 12:34   ` [PATCH v5 0/3] " Patrick Steinhardt
2026-12-01 14:46     ` Aniket Gupta

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=aw_8dyuhRs6DfMTp@pks.im \
    --to=ps@pks.im \
    --cc=aniketgupta3001@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=stolee@gmail.com \
    /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