Re: should git maintenance prefetch be taught to honor remote.fetch refspec?
Derrick Stolee <stolee@gmail.com> writes:
Show 13 quoted lines
> ... but it becomes difficult
> when we intend to make a distinction between "refs/heads/" and
> other sub-areas within "refs/". Finally, I punted on that
> conversion and made the logic in 'prefetch' extremely obvious:
>
> 1. If the refspec's 'dst' starts with "refs/", then replace
> that prefix with "refs/prefetch/".
>
> 2. If the refspec's 'dst' does not start with "refs/", then
> concatenate "refs/prefetch/" and 'dst'.
>
> This will keep a roughly-equivalent partition of refs (some
> might have previously collided that will not any more).
Makes sense. Do we need to add another rule?
3. If the refspec does not have 'dst', ignore it.
Show 8 quoted lines
> I have posted my patch series [1], so please take a look. It
> builds up the infrastructure to properly test such a refspec
> expansion, if we wish to do so.
>
> [1] https://lore.kernel.org/git/pull.924.git.1617627856.gitgitgadget@gmail.com/
>
> Thanks,
> -Stolee