Repository navigation
fix: branch graph not always updated after fetch - #2764
Merged
love-linger merged 1 commit intoOct 8, 2026
Merged
Conversation
…ffer overflow The branch graph was sometimes not updated after a fetch, until a pull or a restart. - `packed-refs` was ignored. A ref updated or deleted only there (e.g. `fetch --prune`, or the `git maintenance run --auto` triggered after a fetch) never scheduled a refresh. - `FileSystemWatcher.Error` was not handled. A large fetch writes thousands of object files, which overflows the internal buffer (8 KB by default): Windows then drops events, including the ones about `refs/remotes/*`, and nothing noticed. Since we cannot know which events were lost, schedule a full reload instead.
AquariusStar
pushed a commit
to AquariusStar/sourcegit
that referenced
this pull request
Oct 10, 2026
- Remove `Trust this repository` checkbox and `CanSure` property, pressing `OK` means trust this repository - Stop processing drop item when there is an untrusted repository because `SourceGit` only supports to display one popup at a time - Remove `TryShowTrustRepositoryPopup` * Both `OpenRepositoryInTab` and `OpenSubRepository` are used for added repositories. * `GetRepositoryGitDir` uses `Directory.Exist` and `File.Exist` first to get the $GIT_DIR Signed-off-by: leo <longshuang@msn.cn>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After a fetch, the branch graph was sometimes not updated: new remote commits were missing until a pull or a restart of the app.
Fetch relied only on the filesystem watcher to notice the updated
refs/remotes/*, and the watcher missed them in two cases:packed-refswas ignored. A ref updated or deleted only there (e.g.fetch --prune, or thegit maintenance run --autogit runs after a fetch) never scheduled a refresh.FileSystemWatcher.Errorwas not handled. A large fetch writes thousands of object files, which overflows the watcher's internal buffer (8 KB by default). Windows then drops events, including the ones about the refs, and nothing noticed.Pull was not affected because it also touches
HEAD/refs/heads/*, which produces more events.Changes
Watcher (
Models/Watcher.cs)packed-refschanges now schedule a branch and tag refresh.Error(buffer overflow), we cannot know which events were lost, so schedule a full reload.