From: Patrick Steinhardt Date: Wed, 02 Dec 2026 11:10:02 GMT Subject: Re: [PATCH v5 3/3] bundle-uri: do not die on unresolvable relative URIs Message-ID: 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 '' has no uri". It made sense to keep the removal. Ah, that makes sense. Thanks! Patrick