Thread (2 messages) 2 messages, 2 authors, 2021-04-05

Re: should git maintenance prefetch be taught to honor remote.fetch refspec?

From: Junio C Hamano <hidden>
Date: 2021-04-05 18:49:00

Possibly related (same subject, not in this thread)

Derrick Stolee [off-list ref] writes:
... 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.
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/ (local)

Thanks,
-Stolee
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help