Subject: Re: [PATCH 3/5] refspec: output a refspec item

From: Junio C Hamano <[email-masked]>
Date: Thu, 08 Apr 2021 00:33:05 -0700

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> But yes, it seems even more straightforward to do away with passing the
> refspec at all to "git fetch", and instead pass some (maybe internal
> only, and documented as such) "--refspec-dst-prefix=refs/prefetch/"
> option to "git fetch".
>
> I.e. get_ref_map() over there is already doing a version of this loop
> over "remote->fetch.nr".
>
> So instead of "git gc" doing the loop, then passing all the refspecs on
> the command-line, it could tell "git fetch" to do the same munging when
> it does the same iteration.

That direction makes quite a lot of sense to me.

> Doing the munging in builtin/gc.c's fetch_remote() just seems like a
> relic from when we didn't care what decision builtin/fetch.c made about
> refspecs, we always wanted our custom one.