Subject: Re: [PATCH v3 10/11] bundle-uri: download bundles from an advertised list

From: Jeff King <[email-masked]>
Date: Thu, 8 Dec 2022 01:40:16 -0500

On Wed, Dec 07, 2022 at 10:54:31AM -0500, Derrick Stolee wrote:

> On 12/7/2022 10:27 AM, Derrick Stolee wrote:
> > On 12/7/2022 7:57 AM, Jeff King wrote:
> 
> >> There are a couple other unused parameters in this series, too, but they
> >> are all in virtual functions and must be kept. I'll add them to my list
> >> of annotations.
> > 
> > Your UNUSED annotations exist in my tree, so I'll try my best to update
> > them in the next version.
> 
> One of these showed an example where I should have been using
> repo_config_...() instead of git_config_...(). Thanks!

Oh good. It is always satisfying when the warning finds a potential bug,
as it sometimes feels a bit like annotation make-work. ;)

In this instance we're in server-side v2 protocol code, which is already
very global-heavy in its world-view. So I don't think it's a real bug
here, but just a nice-to-have.

I have seen this "oops, we don't really use our repository parameter"
issue in a few places. And while I do think it's best to use it if you
have it, I suspect it's the tip of the iceberg in terms of functions
using the_repository. In the long run, I think we'll really smoke those
out from the bottom up, as more functions insist on taking a repository
parameter (and then their callers will have to switch or face the
embarrassment of passing the_repository themselves, and so on).

All of which is to say that yes, that is a fine change to make. But I
don't consider at all urgent in this instance.

-Peff