[pull] master from microsoft:master#116
Merged
Merged
Conversation
When TryDownloadCommit finds the commit via CommitAndRootTreeExists, it now checks whether the commit is a loose object. Loose commits (e.g., from a prior 'git show' or 'git log' in a mounted enlistment) do not include reachable trees. Skipping the download in this case causes 'git checkout -f' to fail with 'unable to read tree', followed by an expensive fallback that re-downloads and retries checkout. If the commit is in a pack file (prefetch or commit pack), trees are included by the GVFS protocol, so the download can safely be skipped. Added GitRepo.LooseObjectExists() to check whether a SHA exists as a loose object file in the shared cache or local object store. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Download commit pack even when commit exists as loose object
Move the named pipe server start earlier in InProcessMount so
MountVerb can connect and poll status during the parallel
auth+validation phase. Add a MountProgress field to the GetStatus
response carrying a human-readable phase description that the CLI
renders as a dynamic spinner sub-status.
Changes:
- NamedPipeMessages: add MountProgress to GetStatus.Response
- InProcessMount: volatile progress string set at each phase;
pipe started after RepoMetadata init (before parallel tasks);
HandleRequest guards non-GetStatus during Mounting state;
HandleGetStatusRequest null-safe for early-pipe fields
- ConsoleHelper: new ShowStatusWhileRunning overloads accepting
Func<string> getMessage for dynamic spinner text
- GVFSEnlistment: optional Action<string> onProgress callback on
WaitUntilMounted (existing callers unaffected)
- MountVerb: wires dynamic spinner to progress callback
User sees: Mounting (Authenticating and validating)...
Mounting (Starting virtualization)...
Mounting...Succeeded
Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Show mount progress phases in CLI during gvfs mount
HandleRequest now catches exceptions from individual pipe request handlers instead of letting them propagate to OnNewConnection, which calls Environment.Exit on any unhandled exception. A single transient error (network timeout, disk I/O failure) in a download handler would crash the entire mount process, breaking all pipe connections. Both catch sites use exception filters to exclude OutOfMemoryException, which indicates a corrupted heap state where continuing is unsafe. StackOverflowException and AccessViolationException are already uncatchable in .NET Core and need no explicit exclusion. HandleDownloadObjectRequest is refactored to isolate the download logic in DownloadObject and wrap it in a try-catch that returns a DownloadFailed response on exception. The read-object hook then receives a proper failure response instead of ERROR_BROKEN_PIPE (109), and git handles the object-not-available error more gracefully. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
When GitRepoTests uses a shared enlistment (enlistmentPerTest=false), check IsMounted() in SetupForTest before running git commands. If the mount process crashed during a previous test, all remaining tests in the fixture would fail with the same unhelpful 'does not appear to be mounted' error from the pre-command hook. The early check produces a clear message pointing to the earlier root-cause failure. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Mount: prevent process crash on unhandled request handler exceptions
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )