Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote: introduce config to set prefetch refs #1782

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 4, 2024

  1. remote: allow specifying refs to prefetch

    When using 'git fetch --prefetch', all fetchable refs are prefetched
    by default. In large repositories with many refs, this can lead to
    unnecessary network traffic and increased disk space use.
    
    Introduce a new configuration option 'remote.<name>.prefetchref' that
    allows users to specify specific ref patterns to be prefetched during
    a 'git fetch --prefetch' operation.
    
    The 'prefetchref' option accepts a space-separated list of ref
    patterns (e.g., 'refs/heads/main !refs/heads/feature/*'). When the
    '--prefetch' option is used with 'git fetch', only the refs matching
    these patterns will be prefetched.
    
    Signed-off-by: Shubham Kanodia <[email protected]>
    pastelsky committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    e3d8aee View commit details
    Browse the repository at this point in the history