Skip to content

Conversation

@derrickstolee
Copy link

@derrickstolee derrickstolee commented Nov 18, 2025

This fixup updates b46ad0a (gvfs-helper: create tool to fetch objects using the GVFS Protocol, 2019-08-13) in reaction to f6f236d (packfile: refactor install_packed_git() to work on packfile store, 2025-09-23) which is included in Git 2.52.0.

This PR is organized to fixup the commit mentioned above and to drop 4e743e6 (packfile: add install_packed_git_and_mru(), 2019-09-25) now that the packfile method is no longer used.

The refactored packfile store includes an automatic inclusion of new packifles into the MRU list. This introduces a bug in microsoft/git's use of the GVFS protocol in the following scenario in 'git fetch':

  1. If the prefetch downloads at least one prefetch packfile, then it is added to the MRU list twice, creating an infinite loop.

  2. If the refs that are updated include commits that are not present in the packfile list, then the MRU lookup will iterate through without interruption, hitting the infinite loop.

The fix is to modify this patch to no longer include a custom "add to MRU" method now that the default implementation does this for us.

  • This change only applies to interactions with Azure DevOps and the
    GVFS Protocol.

@derrickstolee derrickstolee self-assigned this Nov 18, 2025
This fixup updates b46ad0a (gvfs-helper: create tool to fetch objects
using the GVFS Protocol, 2019-08-13) in reaction to f6f236d
(packfile: refactor `install_packed_git()` to work on packfile store,
2025-09-23) which is included in Git 2.52.0.

The refactored packfile store includes an automatic inclusion of new
packifles into the MRU list. This introduces a bug in microsoft/git's
use of the GVFS protocol in the following scenario in 'git fetch':

 1. If the prefetch downloads at least one prefetch packfile, then it is
    added to the MRU list twice, creating an infinite loop.

 2. If the refs that are updated include commits that are not present in
    the packfile list, then the MRU lookup will iterate through without
    interruption, hitting the infinite loop.

The fix is to modify this patch to no longer include a custom "add to
MRU" method now that the default implementation does this for us.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
This makes the commit trivial and will be dropped in a future update.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
@derrickstolee derrickstolee changed the title fixup! gvfs-helper: create tool to fetch objects using the GVFS Protocol Fix infinite loop in packfile MRU after prefetch packs are added Nov 18, 2025
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

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

Thank you so much @derrickstolee!

@dscho dscho merged commit 72f6d6d into microsoft:vfs-2.52.0 Nov 18, 2025
68 of 69 checks passed
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