From: Junio C Hamano Date: Thu, 08 Apr 2021 07:33:05 GMT Subject: Re: [PATCH 3/5] refspec: output a refspec item Message-ID: In-Reply-To: <871rblk8ct.fsf@evledraar.gmail.com> Ævar Arnfjörð Bjarmason writes: Ævar Arnfjörð Bjarmason 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.