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