Skip to content

Conversation

@tyrielv
Copy link
Contributor

@tyrielv tyrielv commented Nov 20, 2025

The first prefetch for a large repository can take some time and (if gvfs.trust-pack-indexes is false) heavy CPU and disk resources.

If a user cloned with --no-prefetch, let's assume they knew what they were doing and not automatically prefetch after 15 minutes.

A typical use-case for --no-prefetch is in a CI pipeline which only needs the head of a branch.

The first prefetch for a large repository can take some time and (if gvfs.trust-
pack-indexes is false) heavy CPU and disk resources.

If a user cloned with --no-prefetch, let's assume they knew what they were doing
and not automatically prefetch after 15 minutes.

A typical use-case for --no-prefetch is in a CI pipeline which only needs the
head of a branch.
Copy link
Contributor

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the way that you use the state of the data to make this decision, instead of storing some kind of config option. This allows users to automatically "upgrade" to prefetching if they opt-in via a foreground prefetch with gvfs prefetch --commits.

@tyrielv tyrielv merged commit 7c33f9e into microsoft:master Nov 20, 2025
49 checks passed
@mjcheetham mjcheetham mentioned this pull request Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants