git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Improvement: `git-maintenance` to allow configuring of remotes to fetch
@ 2024-08-26 11:50 Shubham Kanodia
  2024-08-28 11:32 ` Patrick Steinhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Shubham Kanodia @ 2024-08-26 11:50 UTC (permalink / raw)
  To: git

`git-maintenance` aims to improve the health & performance of
especially large git repositories.
A part of git maintenance tasks is `prefetch`.

However, at the moment, it prefetches all objects from all branches —

> The prefetch task updates the object directory with the latest objects from all registered remotes.

This seems non-optimal for repositories where users use the main
repository to fork branches (instead of personal forks) as the remote
could have thousands of refs and objects from branches that a user may
not care about, leading to a very large prefetch dir.

For large repositories, it might instead be helpful to only fetch
objects on `main` or `master` because those are the ones most likely
to be used by users.

To this effect, git maintenance should perhaps expose a
maintenance.prefetch.refs setting that subsets prefetching only to
certain references.

Is this something that has been raised before / is in works by any
chance or something that would be an acceptable contribution?

-- 
Regards,
Shubham Kanodia

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-09-04 18:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 11:50 Improvement: `git-maintenance` to allow configuring of remotes to fetch Shubham Kanodia
2024-08-28 11:32 ` Patrick Steinhardt
2024-08-28 16:31   ` Junio C Hamano
2024-09-02 15:46     ` Shubham Kanodia
2024-09-03  5:18       ` Patrick Steinhardt
2024-09-03  6:01         ` Shubham Kanodia
2024-09-03  9:48           ` Patrick Steinhardt
2024-09-03 16:07         ` Junio C Hamano
2024-09-04 16:29           ` Shubham Kanodia
2024-09-04 18:10             ` Shubham Kanodia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).