Showing preview only (4,579K chars total). Download the full file or copy to clipboard to get everything.
Repository: Microsoft/VFSForGit
Branch: master
Commit: 7fa6733dc6e0
Files: 665
Total size: 4.2 MB
Directory structure:
gitextract_91dbp7i6/
├── .azure-pipelines/
│ └── release.yml
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ ├── build.yaml
│ ├── functional-tests.yaml
│ ├── release-winget.yaml
│ └── scripts/
│ └── validate_release.ps1
├── .gitignore
├── .vsconfig
├── AuthoringTests.md
├── CONTRIBUTING.md
├── Directory.Build.props
├── Directory.Build.targets
├── Directory.Packages.props
├── Directory.Solution.props
├── GVFS/
│ ├── FastFetch/
│ │ ├── CheckoutPrefetcher.cs
│ │ ├── CheckoutStage.cs
│ │ ├── FastFetch.csproj
│ │ ├── FastFetchLibGit2Repo.cs
│ │ ├── FastFetchVerb.cs
│ │ ├── GitEnlistment.cs
│ │ ├── Index.cs
│ │ ├── IndexLock.cs
│ │ ├── NativeMethods.cs
│ │ ├── Program.cs
│ │ └── WorkingTree.cs
│ ├── GVFS/
│ │ ├── CommandLine/
│ │ │ ├── CacheServerVerb.cs
│ │ │ ├── CacheVerb.cs
│ │ │ ├── CloneVerb.cs
│ │ │ ├── ConfigVerb.cs
│ │ │ ├── DehydrateVerb.cs
│ │ │ ├── DiagnoseVerb.cs
│ │ │ ├── GVFSVerb.cs
│ │ │ ├── HealthVerb.cs
│ │ │ ├── LogVerb.cs
│ │ │ ├── MountVerb.cs
│ │ │ ├── PrefetchVerb.cs
│ │ │ ├── RepairVerb.cs
│ │ │ ├── ServiceVerb.cs
│ │ │ ├── SparseVerb.cs
│ │ │ ├── StatusVerb.cs
│ │ │ ├── UnmountVerb.cs
│ │ │ └── UpgradeVerb.cs
│ │ ├── GVFS.csproj
│ │ ├── InternalsVisibleTo.cs
│ │ ├── Program.cs
│ │ └── RepairJobs/
│ │ ├── BackgroundOperationDatabaseRepairJob.cs
│ │ ├── BlobSizeDatabaseRepairJob.cs
│ │ ├── GitConfigRepairJob.cs
│ │ ├── GitHeadRepairJob.cs
│ │ ├── GitIndexRepairJob.cs
│ │ ├── RepairJob.cs
│ │ ├── RepoMetadataDatabaseRepairJob.cs
│ │ └── VFSForGitDatabaseRepairJob.cs
│ ├── GVFS.Common/
│ │ ├── AzDevOpsOrgFromNuGetFeed.cs
│ │ ├── ConcurrentHashSet.cs
│ │ ├── ConsoleHelper.cs
│ │ ├── Database/
│ │ │ ├── GVFSDatabase.cs
│ │ │ ├── GVFSDatabaseException.cs
│ │ │ ├── IDbCommandExtensions.cs
│ │ │ ├── IDbConnectionFactory.cs
│ │ │ ├── IGVFSConnectionPool.cs
│ │ │ ├── IPlaceholderCollection.cs
│ │ │ ├── IPlaceholderData.cs
│ │ │ ├── ISparseCollection.cs
│ │ │ ├── PlaceholderTable.cs
│ │ │ ├── SparseTable.cs
│ │ │ └── SqliteDatabase.cs
│ │ ├── DiskLayoutUpgrades/
│ │ │ ├── DiskLayoutUpgrade.cs
│ │ │ ├── DiskLayoutUpgrade_SqlitePlaceholders.cs
│ │ │ └── DiskLayoutVersion.cs
│ │ ├── Enlistment.cs
│ │ ├── EpochConverter.cs
│ │ ├── FileBasedCollection.cs
│ │ ├── FileBasedCollectionException.cs
│ │ ├── FileBasedDictionary.cs
│ │ ├── FileBasedLock.cs
│ │ ├── FileSystem/
│ │ │ ├── DirectoryItemInfo.cs
│ │ │ ├── FileProperties.cs
│ │ │ ├── FlushToDiskFileStream.cs
│ │ │ ├── HooksInstaller.cs
│ │ │ ├── IKernelDriver.cs
│ │ │ ├── IPlatformFileSystem.cs
│ │ │ └── PhysicalFileSystem.cs
│ │ ├── GVFS.Common.csproj
│ │ ├── GVFSConstants.cs
│ │ ├── GVFSContext.cs
│ │ ├── GVFSEnlistment.Shared.cs
│ │ ├── GVFSEnlistment.cs
│ │ ├── GVFSLock.Shared.cs
│ │ ├── GVFSLock.cs
│ │ ├── GVFSPlatform.cs
│ │ ├── Git/
│ │ │ ├── DiffTreeResult.cs
│ │ │ ├── EndianHelper.cs
│ │ │ ├── GVFSGitObjects.cs
│ │ │ ├── GitAuthentication.cs
│ │ │ ├── GitConfigHelper.cs
│ │ │ ├── GitConfigSetting.cs
│ │ │ ├── GitCoreGVFSFlags.cs
│ │ │ ├── GitIndexGenerator.cs
│ │ │ ├── GitObjectContentType.cs
│ │ │ ├── GitObjects.cs
│ │ │ ├── GitOid.cs
│ │ │ ├── GitPathConverter.cs
│ │ │ ├── GitProcess.cs
│ │ │ ├── GitRefs.cs
│ │ │ ├── GitRepo.cs
│ │ │ ├── GitSsl.cs
│ │ │ ├── GitVersion.cs
│ │ │ ├── HashingStream.cs
│ │ │ ├── ICredentialStore.cs
│ │ │ ├── IGitInstallation.cs
│ │ │ ├── LibGit2Exception.cs
│ │ │ ├── LibGit2Repo.cs
│ │ │ ├── LibGit2RepoInvoker.cs
│ │ │ ├── NoOpStream.cs
│ │ │ ├── RefLogEntry.cs
│ │ │ ├── RequiredGitConfig.cs
│ │ │ ├── Sha1Id.cs
│ │ │ └── SideChannelStream.cs
│ │ ├── GitCommandLineParser.cs
│ │ ├── GitStatusCache.cs
│ │ ├── GitStatusCacheConfig.cs
│ │ ├── HealthCalculator/
│ │ │ ├── EnlistmentHealthCalculator.cs
│ │ │ ├── EnlistmentHealthData.cs
│ │ │ ├── EnlistmentHydrationSummary.cs
│ │ │ ├── EnlistmentPathData.cs
│ │ │ └── HydrationStatusCircuitBreaker.cs
│ │ ├── HeartbeatThread.cs
│ │ ├── Http/
│ │ │ ├── CacheServerInfo.cs
│ │ │ ├── CacheServerResolver.cs
│ │ │ ├── ConfigHttpRequestor.cs
│ │ │ ├── GitEndPointResponseData.cs
│ │ │ ├── GitObjectsHttpException.cs
│ │ │ ├── GitObjectsHttpRequestor.cs
│ │ │ └── HttpRequestor.cs
│ │ ├── IDiskLayoutUpgradeData.cs
│ │ ├── IHeartBeatMetadataProvider.cs
│ │ ├── IProcessRunner.cs
│ │ ├── InternalVerbParameters.cs
│ │ ├── InternalsVisibleTo.cs
│ │ ├── InvalidRepoException.cs
│ │ ├── LegacyPlaceholderListDatabase.cs
│ │ ├── LocalCacheResolver.cs
│ │ ├── LocalGVFSConfig.cs
│ │ ├── Maintenance/
│ │ │ ├── GitMaintenanceQueue.cs
│ │ │ ├── GitMaintenanceScheduler.cs
│ │ │ ├── GitMaintenanceStep.cs
│ │ │ ├── GitProcessChecker.cs
│ │ │ ├── LooseObjectsStep.cs
│ │ │ ├── PackfileMaintenanceStep.cs
│ │ │ ├── PostFetchStep.cs
│ │ │ └── PrefetchStep.cs
│ │ ├── MissingTreeTracker.cs
│ │ ├── ModifiedPathsDatabase.cs
│ │ ├── NamedPipes/
│ │ │ ├── AllowAllLocksNamedPipeServer.cs
│ │ │ ├── BrokenPipeException.cs
│ │ │ ├── HydrationStatusNamedPipeMessages.cs
│ │ │ ├── LockNamedPipeMessages.cs
│ │ │ ├── NamedPipeClient.cs
│ │ │ ├── NamedPipeMessages.cs
│ │ │ ├── NamedPipeServer.cs
│ │ │ ├── NamedPipeStreamReader.cs
│ │ │ ├── NamedPipeStreamWriter.cs
│ │ │ ├── PipeNameLengthException.cs
│ │ │ └── UnstageNamedPipeMessages.cs
│ │ ├── NativeMethods.Shared.cs
│ │ ├── NativeMethods.cs
│ │ ├── NetworkStreams/
│ │ │ ├── BatchedLooseObjectDeserializer.cs
│ │ │ ├── PrefetchPacksDeserializer.cs
│ │ │ └── RestrictedStream.cs
│ │ ├── OrgInfoApiClient.cs
│ │ ├── Paths.Shared.cs
│ │ ├── Prefetch/
│ │ │ ├── BlobPrefetcher.cs
│ │ │ ├── Git/
│ │ │ │ ├── DiffHelper.cs
│ │ │ │ ├── PathWithMode.cs
│ │ │ │ └── PrefetchGitObjects.cs
│ │ │ └── Pipeline/
│ │ │ ├── BatchObjectDownloadStage.cs
│ │ │ ├── Data/
│ │ │ │ ├── BlobDownloadRequest.cs
│ │ │ │ ├── IndexPackRequest.cs
│ │ │ │ └── TreeSearchRequest.cs
│ │ │ ├── FindBlobsStage.cs
│ │ │ ├── HydrateFilesStage.cs
│ │ │ ├── IndexPackStage.cs
│ │ │ └── PrefetchPipelineStage.cs
│ │ ├── ProcessHelper.cs
│ │ ├── ProcessResult.cs
│ │ ├── ProcessRunnerImpl.cs
│ │ ├── RepoMetadata.cs
│ │ ├── RetryBackoff.cs
│ │ ├── RetryCircuitBreaker.cs
│ │ ├── RetryConfig.cs
│ │ ├── RetryWrapper.cs
│ │ ├── RetryableException.cs
│ │ ├── ReturnCode.cs
│ │ ├── SHA1Util.cs
│ │ ├── ServerGVFSConfig.cs
│ │ ├── StreamUtil.cs
│ │ ├── Tracing/
│ │ │ ├── DiagnosticConsoleEventListener.cs
│ │ │ ├── EventLevel.cs
│ │ │ ├── EventListener.cs
│ │ │ ├── EventMetadata.cs
│ │ │ ├── EventOpcode.cs
│ │ │ ├── IEventListenerEventSink.cs
│ │ │ ├── IQueuedPipeStringWriterEventSink.cs
│ │ │ ├── ITracer.cs
│ │ │ ├── JsonTracer.cs
│ │ │ ├── Keywords.cs
│ │ │ ├── LogFileEventListener.cs
│ │ │ ├── NullTracer.cs
│ │ │ ├── PrettyConsoleEventListener.cs
│ │ │ ├── QueuedPipeStringWriter.cs
│ │ │ ├── TelemetryDaemonEventListener.cs
│ │ │ ├── TraceEventMessage.cs
│ │ │ └── TracingConstants.cs
│ │ ├── VersionResponse.cs
│ │ ├── WorktreeCommandParser.cs
│ │ └── X509Certificates/
│ │ ├── CertificateVerifier.cs
│ │ └── SystemCertificateStore.cs
│ ├── GVFS.FunctionalTests/
│ │ ├── AssemblyAttributes.cs
│ │ ├── Categories.cs
│ │ ├── FileSystemRunners/
│ │ │ ├── BashRunner.cs
│ │ │ ├── CmdRunner.cs
│ │ │ ├── FileSystemRunner.cs
│ │ │ ├── PowerShellRunner.cs
│ │ │ ├── ShellRunner.cs
│ │ │ └── SystemIORunner.cs
│ │ ├── GVFS.FunctionalTests.csproj
│ │ ├── GVFSTestConfig.cs
│ │ ├── GlobalSetup.cs
│ │ ├── Program.cs
│ │ ├── Settings.cs
│ │ ├── Should/
│ │ │ └── FileSystemShouldExtensions.cs
│ │ ├── Tests/
│ │ │ ├── DiskLayoutVersionTests.cs
│ │ │ ├── EnlistmentPerFixture/
│ │ │ │ ├── BasicFileSystemTests.cs
│ │ │ │ ├── CacheServerTests.cs
│ │ │ │ ├── CloneTests.cs
│ │ │ │ ├── DehydrateTests.cs
│ │ │ │ ├── DiagnoseTests.cs
│ │ │ │ ├── GVFSLockTests.cs
│ │ │ │ ├── GVFSUpgradeReminderTests.cs
│ │ │ │ ├── GitBlockCommandsTests.cs
│ │ │ │ ├── GitCorruptObjectTests.cs
│ │ │ │ ├── GitFilesTests.cs
│ │ │ │ ├── GitMoveRenameTests.cs
│ │ │ │ ├── GitReadAndGitLockTests.cs
│ │ │ │ ├── HealthTests.cs
│ │ │ │ ├── MountTests.cs
│ │ │ │ ├── MoveRenameFileTests.cs
│ │ │ │ ├── MoveRenameFileTests_2.cs
│ │ │ │ ├── MoveRenameFolderTests.cs
│ │ │ │ ├── MultithreadedReadWriteTests.cs
│ │ │ │ ├── ParallelHydrationTests.cs
│ │ │ │ ├── PrefetchVerbTests.cs
│ │ │ │ ├── PrefetchVerbWithoutSharedCacheTests.cs
│ │ │ │ ├── SparseTests.cs
│ │ │ │ ├── StatusVerbTests.cs
│ │ │ │ ├── SymbolicLinkTests.cs
│ │ │ │ ├── TestsWithEnlistmentPerFixture.cs
│ │ │ │ ├── UnmountTests.cs
│ │ │ │ ├── UpdatePlaceholderTests.cs
│ │ │ │ ├── WorkingDirectoryTests.cs
│ │ │ │ └── WorktreeTests.cs
│ │ │ ├── EnlistmentPerTestCase/
│ │ │ │ ├── DiskLayoutUpgradeTests.cs
│ │ │ │ ├── LooseObjectStepTests.cs
│ │ │ │ ├── ModifiedPathsTests.cs
│ │ │ │ ├── PersistedWorkingDirectoryTests.cs
│ │ │ │ ├── RepairTests.cs
│ │ │ │ └── TestsWithEnlistmentPerTestCase.cs
│ │ │ ├── FastFetchTests.cs
│ │ │ ├── GVFSVerbTests.cs
│ │ │ ├── GitCommands/
│ │ │ │ ├── AddStageTests.cs
│ │ │ │ ├── CheckoutTests.cs
│ │ │ │ ├── CherryPickConflictTests.cs
│ │ │ │ ├── CorruptionReproTests.cs
│ │ │ │ ├── CreatePlaceholderTests.cs
│ │ │ │ ├── DeleteEmptyFolderTests.cs
│ │ │ │ ├── EnumerationMergeTest.cs
│ │ │ │ ├── GitCommandsTests.cs
│ │ │ │ ├── GitRepoTests.cs
│ │ │ │ ├── HashObjectTests.cs
│ │ │ │ ├── MergeConflictTests.cs
│ │ │ │ ├── RebaseConflictTests.cs
│ │ │ │ ├── RebaseTests.cs
│ │ │ │ ├── ResetHardTests.cs
│ │ │ │ ├── ResetMixedTests.cs
│ │ │ │ ├── ResetSoftTests.cs
│ │ │ │ ├── RmTests.cs
│ │ │ │ ├── StatusTests.cs
│ │ │ │ ├── UpdateIndexTests.cs
│ │ │ │ └── UpdateRefTests.cs
│ │ │ ├── MultiEnlistmentTests/
│ │ │ │ ├── ConfigVerbTests.cs
│ │ │ │ ├── ServiceVerbTests.cs
│ │ │ │ ├── SharedCacheTests.cs
│ │ │ │ └── TestsWithMultiEnlistment.cs
│ │ │ ├── PrintTestCaseStats.cs
│ │ │ └── TestResultsHelper.cs
│ │ ├── Tools/
│ │ │ ├── ControlGitRepo.cs
│ │ │ ├── FileSystemHelpers.cs
│ │ │ ├── GVFSFunctionalTestEnlistment.cs
│ │ │ ├── GVFSHelpers.cs
│ │ │ ├── GVFSProcess.cs
│ │ │ ├── GVFSServiceProcess.cs
│ │ │ ├── GitHelpers.cs
│ │ │ ├── GitProcess.cs
│ │ │ ├── NativeMethods.cs
│ │ │ ├── ProcessHelper.cs
│ │ │ ├── ProcessResult.cs
│ │ │ ├── ProjFSFilterInstaller.cs
│ │ │ ├── RepositoryHelpers.cs
│ │ │ └── TestConstants.cs
│ │ └── Windows/
│ │ ├── TestData/
│ │ │ └── BackgroundGitUpdates/
│ │ │ ├── PersistentDictionary.edb
│ │ │ ├── PersistentDictionary.jfm
│ │ │ ├── epc.chk
│ │ │ ├── epcres00001.jrs
│ │ │ └── epcres00002.jrs
│ │ ├── Tests/
│ │ │ ├── JunctionAndSubstTests.cs
│ │ │ ├── ServiceTests.cs
│ │ │ ├── SharedCacheUpgradeTests.cs
│ │ │ ├── WindowsDiskLayoutUpgradeTests.cs
│ │ │ ├── WindowsFileSystemTests.cs
│ │ │ ├── WindowsFolderUsnUpdate.cs
│ │ │ ├── WindowsTombstoneTests.cs
│ │ │ └── WindowsUpdatePlaceholderTests.cs
│ │ └── Tools/
│ │ └── RegistryHelper.cs
│ ├── GVFS.FunctionalTests.LockHolder/
│ │ ├── AcquireGVFSLock.cs
│ │ ├── GVFS.FunctionalTests.LockHolder.csproj
│ │ └── Program.cs
│ ├── GVFS.Hooks/
│ │ ├── GVFS.Hooks.csproj
│ │ ├── HooksPlatform/
│ │ │ └── GVFSHooksPlatform.cs
│ │ ├── KnownGitCommands.cs
│ │ ├── Program.Unstage.cs
│ │ ├── Program.Worktree.cs
│ │ ├── Program.cs
│ │ └── UnstageCommandParser.cs
│ ├── GVFS.Installers/
│ │ ├── GVFS.Installers.csproj
│ │ ├── Setup.iss
│ │ ├── info.bat
│ │ └── install.bat
│ ├── GVFS.MSBuild/
│ │ ├── CompileTemplatedFile.cs
│ │ ├── GVFS.MSBuild.csproj
│ │ ├── GVFS.targets
│ │ ├── GVFS.tasks
│ │ ├── GenerateGVFSConstants.cs
│ │ ├── GenerateGVFSVersionHeader.cs
│ │ └── GenerateWindowsAppManifest.cs
│ ├── GVFS.Mount/
│ │ ├── GVFS.Mount.csproj
│ │ ├── InProcessMount.cs
│ │ ├── InProcessMountVerb.cs
│ │ ├── MountAbortedException.cs
│ │ └── Program.cs
│ ├── GVFS.NativeHooks.Common/
│ │ ├── common.h
│ │ └── common.windows.cpp
│ ├── GVFS.NativeTests/
│ │ ├── FileUtils.cpp
│ │ ├── FileUtils.h
│ │ ├── GVFS.NativeTests.vcxproj
│ │ ├── GVFS.NativeTests.vcxproj.filters
│ │ ├── ReadMe.txt
│ │ ├── include/
│ │ │ ├── NtFunctions.h
│ │ │ ├── SafeHandle.h
│ │ │ ├── SafeOverlapped.h
│ │ │ ├── Should.h
│ │ │ ├── TestException.h
│ │ │ ├── TestHelpers.h
│ │ │ ├── TestVerifiers.h
│ │ │ ├── prjlib_internal.h
│ │ │ ├── prjlibp.h
│ │ │ ├── stdafx.h
│ │ │ └── targetver.h
│ │ ├── interface/
│ │ │ ├── NtQueryDirectoryFileTests.h
│ │ │ ├── PlaceholderUtils.h
│ │ │ ├── ProjFS_BugRegressionTest.h
│ │ │ ├── ProjFS_DeleteFileTest.h
│ │ │ ├── ProjFS_DeleteFolderTest.h
│ │ │ ├── ProjFS_DirEnumTest.h
│ │ │ ├── ProjFS_FileAttributeTest.h
│ │ │ ├── ProjFS_FileEATest.h
│ │ │ ├── ProjFS_FileOperationTest.h
│ │ │ ├── ProjFS_MoveFileTest.h
│ │ │ ├── ProjFS_MoveFolderTest.h
│ │ │ ├── ProjFS_MultiThreadsTest.h
│ │ │ ├── ProjFS_SetLinkTest.h
│ │ │ ├── ReadAndWriteTests.h
│ │ │ └── TrailingSlashTests.h
│ │ ├── packages.config
│ │ └── source/
│ │ ├── NtFunctions.cpp
│ │ ├── NtQueryDirectoryFileTests.cpp
│ │ ├── PlaceholderUtils.cpp
│ │ ├── ProjFS_BugRegressionTest.cpp
│ │ ├── ProjFS_DeleteFileTest.cpp
│ │ ├── ProjFS_DeleteFolderTest.cpp
│ │ ├── ProjFS_DirEnumTest.cpp
│ │ ├── ProjFS_FileAttributeTest.cpp
│ │ ├── ProjFS_FileEATest.cpp
│ │ ├── ProjFS_FileOperationTest.cpp
│ │ ├── ProjFS_MoveFileTest.cpp
│ │ ├── ProjFS_MoveFolderTest.cpp
│ │ ├── ProjFS_MultiThreadTest.cpp
│ │ ├── ProjFS_SetLinkTest.cpp
│ │ ├── ReadAndWriteTests.cpp
│ │ ├── TrailingSlashTests.cpp
│ │ ├── dllmain.cpp
│ │ └── stdafx.cpp
│ ├── GVFS.Payload/
│ │ ├── GVFS.Payload.csproj
│ │ └── layout.bat
│ ├── GVFS.PerfProfiling/
│ │ ├── GVFS.PerfProfiling.csproj
│ │ ├── ProfilingEnvironment.cs
│ │ └── Program.cs
│ ├── GVFS.Platform.Windows/
│ │ ├── ActiveEnumeration.cs
│ │ ├── CurrentUser.cs
│ │ ├── DiskLayoutUpgrades/
│ │ │ ├── DiskLayout14to15Upgrade_ModifiedPaths.cs
│ │ │ ├── DiskLayout15to16Upgrade_GitStatusCache.cs
│ │ │ ├── DiskLayout16to17Upgrade_FolderPlaceholderValues.cs
│ │ │ ├── DiskLayout17to18Upgrade_TombstoneFolderPlaceholders.cs
│ │ │ ├── DiskLayout18to19Upgrade_SqlitePlacholders.cs
│ │ │ └── WindowsDiskLayoutUpgradeData.cs
│ │ ├── GVFS.Platform.Windows.csproj
│ │ ├── HResultExtensions.cs
│ │ ├── PatternMatcher.cs
│ │ ├── PlatformLoader.Windows.cs
│ │ ├── ProjFSFilter.cs
│ │ ├── Readme.md
│ │ ├── WindowsFileBasedLock.cs
│ │ ├── WindowsFileSystem.Shared.cs
│ │ ├── WindowsFileSystem.cs
│ │ ├── WindowsFileSystemVirtualizer.cs
│ │ ├── WindowsGitHooksInstaller.cs
│ │ ├── WindowsGitInstallation.cs
│ │ ├── WindowsPhysicalDiskInfo.cs
│ │ ├── WindowsPlatform.Shared.cs
│ │ └── WindowsPlatform.cs
│ ├── GVFS.PostIndexChangedHook/
│ │ ├── GVFS.PostIndexChangedHook.vcxproj
│ │ ├── GVFS.PostIndexChangedHook.vcxproj.filters
│ │ ├── Version.rc
│ │ ├── main.cpp
│ │ ├── resource.h
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ └── targetver.h
│ ├── GVFS.ReadObjectHook/
│ │ ├── GVFS.ReadObjectHook.vcxproj
│ │ ├── GVFS.ReadObjectHook.vcxproj.filters
│ │ ├── Version.rc
│ │ ├── main.cpp
│ │ ├── packet.cpp
│ │ ├── packet.h
│ │ ├── resource.h
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ └── targetver.h
│ ├── GVFS.Service/
│ │ ├── Configuration.cs
│ │ ├── GVFS.Service.csproj
│ │ ├── GVFSMountProcess.cs
│ │ ├── GVFSService.Windows.cs
│ │ ├── Handlers/
│ │ │ ├── EnableAndAttachProjFSHandler.cs
│ │ │ ├── GetActiveRepoListHandler.cs
│ │ │ ├── INotificationHandler.cs
│ │ │ ├── MessageHandler.cs
│ │ │ ├── NotificationHandler.cs
│ │ │ ├── RegisterRepoHandler.cs
│ │ │ ├── RequestHandler.Windows.cs
│ │ │ ├── RequestHandler.cs
│ │ │ └── UnregisterRepoHandler.cs
│ │ ├── IRepoMounter.cs
│ │ ├── IRepoRegistry.cs
│ │ ├── Program.cs
│ │ ├── RepoRegistration.cs
│ │ └── RepoRegistry.cs
│ ├── GVFS.Tests/
│ │ ├── DataSources.cs
│ │ ├── GVFS.Tests.csproj
│ │ ├── NUnitRunner.cs
│ │ └── Should/
│ │ ├── EnumerableShouldExtensions.cs
│ │ ├── StringExtensions.cs
│ │ ├── StringShouldExtensions.cs
│ │ └── ValueShouldExtensions.cs
│ ├── GVFS.UnitTests/
│ │ ├── Category/
│ │ │ └── CategoryConstants.cs
│ │ ├── CommandLine/
│ │ │ ├── CacheVerbTests.cs
│ │ │ └── HooksInstallerTests.cs
│ │ ├── Common/
│ │ │ ├── AzDevOpsOrgFromNuGetFeedTests.cs
│ │ │ ├── BackgroundTaskQueueTests.cs
│ │ │ ├── CacheServerResolverTests.cs
│ │ │ ├── Database/
│ │ │ │ ├── GVFSDatabaseTests.cs
│ │ │ │ ├── PlaceholderTableTests.cs
│ │ │ │ ├── SparseTableTests.cs
│ │ │ │ └── TableTests.cs
│ │ │ ├── EnlistmentHydrationSummaryTests.cs
│ │ │ ├── EpochConverterTests.cs
│ │ │ ├── FileBasedDictionaryTests.cs
│ │ │ ├── GVFSEnlistmentHealthTests.cs
│ │ │ ├── GVFSEnlistmentTests.cs
│ │ │ ├── GVFSLockTests.cs
│ │ │ ├── Git/
│ │ │ │ ├── GitSslTests.cs
│ │ │ │ └── Sha1IdTests.cs
│ │ │ ├── GitCommandLineParserTests.cs
│ │ │ ├── GitConfigHelperTests.cs
│ │ │ ├── GitObjectsTests.cs
│ │ │ ├── GitPathConverterTests.cs
│ │ │ ├── GitStatusCacheTests.cs
│ │ │ ├── GitVersionTests.cs
│ │ │ ├── HydrationStatusCircuitBreakerTests.cs
│ │ │ ├── HydrationStatusErrorPathTests.cs
│ │ │ ├── JsonTracerTests.cs
│ │ │ ├── LegacyPlaceholderDatabaseTests.cs
│ │ │ ├── LibGit2RepoInvokerTests.cs
│ │ │ ├── LibGit2RepoSafeDirectoryTests.cs
│ │ │ ├── MissingTreeTrackerTests.cs
│ │ │ ├── ModifiedPathsDatabaseTests.cs
│ │ │ ├── NamedPipeStreamReaderWriterTests.cs
│ │ │ ├── NamedPipeTests.cs
│ │ │ ├── OrgInfoApiClientTests.cs
│ │ │ ├── PathsTests.cs
│ │ │ ├── PhysicalFileSystemDeleteTests.cs
│ │ │ ├── RefLogEntryTests.cs
│ │ │ ├── RetryBackoffTests.cs
│ │ │ ├── RetryConfigTests.cs
│ │ │ ├── RetryWrapperTests.cs
│ │ │ ├── SHA1UtilTests.cs
│ │ │ ├── WorktreeCommandParserTests.cs
│ │ │ ├── WorktreeEnlistmentTests.cs
│ │ │ ├── WorktreeInfoTests.cs
│ │ │ └── WorktreeNestedPathTests.cs
│ │ ├── Data/
│ │ │ ├── backward.txt
│ │ │ ├── caseChange.txt
│ │ │ ├── forward.txt
│ │ │ └── index_v4
│ │ ├── GVFS.UnitTests.csproj
│ │ ├── Git/
│ │ │ ├── GVFSGitObjectsTests.cs
│ │ │ ├── GitAuthenticationTests.cs
│ │ │ ├── GitObjectsTests.cs
│ │ │ └── GitProcessTests.cs
│ │ ├── Hooks/
│ │ │ ├── PostIndexChangedHookTests.cs
│ │ │ └── UnstageTests.cs
│ │ ├── Maintenance/
│ │ │ ├── GitMaintenanceQueueTests.cs
│ │ │ ├── GitMaintenanceStepTests.cs
│ │ │ ├── LooseObjectStepTests.cs
│ │ │ ├── PackfileMaintenanceStepTests.cs
│ │ │ └── PostFetchStepTests.cs
│ │ ├── Mock/
│ │ │ ├── Common/
│ │ │ │ ├── MockFileBasedLock.cs
│ │ │ │ ├── MockGVFSEnlistment.cs
│ │ │ │ ├── MockGitStatusCache.cs
│ │ │ │ ├── MockLocalGVFSConfig.cs
│ │ │ │ ├── MockLocalGVFSConfigBuilder.cs
│ │ │ │ ├── MockPhysicalGitObjects.cs
│ │ │ │ ├── MockPlatform.cs
│ │ │ │ ├── MockTracer.cs
│ │ │ │ └── Tracing/
│ │ │ │ └── MockListener.cs
│ │ │ ├── FileSystem/
│ │ │ │ ├── ConfigurableFileSystem.cs
│ │ │ │ ├── MockDirectory.cs
│ │ │ │ ├── MockFile.cs
│ │ │ │ ├── MockFileSystem.cs
│ │ │ │ ├── MockFileSystemCallbacks.cs
│ │ │ │ ├── MockFileSystemWithCallbacks.cs
│ │ │ │ └── MockPlatformFileSystem.cs
│ │ │ ├── Git/
│ │ │ │ ├── MockBatchHttpGitObjects.cs
│ │ │ │ ├── MockGVFSGitObjects.cs
│ │ │ │ ├── MockGitInstallation.cs
│ │ │ │ ├── MockGitProcess.cs
│ │ │ │ ├── MockGitRepo.cs
│ │ │ │ ├── MockHttpGitObjects.cs
│ │ │ │ └── MockLibGit2Repo.cs
│ │ │ ├── MockCacheServerInfo.cs
│ │ │ ├── MockTextWriter.cs
│ │ │ ├── ReusableMemoryStream.cs
│ │ │ └── Virtualization/
│ │ │ ├── Background/
│ │ │ │ └── MockBackgroundTaskManager.cs
│ │ │ ├── BlobSize/
│ │ │ │ └── MockBlobSizesDatabase.cs
│ │ │ ├── FileSystem/
│ │ │ │ └── MockFileSystemVirtualizer.cs
│ │ │ └── Projection/
│ │ │ └── MockGitIndexProjection.cs
│ │ ├── Prefetch/
│ │ │ ├── BatchObjectDownloadStageTests.cs
│ │ │ ├── BlobPrefetcherTests.cs
│ │ │ ├── DiffHelperTests.cs
│ │ │ ├── DiffTreeResultTests.cs
│ │ │ ├── PrefetchPacksDeserializerTests.cs
│ │ │ └── PrefetchTracingTests.cs
│ │ ├── Program.cs
│ │ ├── Readme.md
│ │ ├── Service/
│ │ │ └── RepoRegistryTests.cs
│ │ ├── Setup.cs
│ │ ├── Tracing/
│ │ │ ├── EventListenerTests.cs
│ │ │ ├── QueuedPipeStringWriterTests.cs
│ │ │ └── TelemetryDaemonEventListenerTests.cs
│ │ ├── Virtual/
│ │ │ ├── CommonRepoSetup.cs
│ │ │ ├── FileSystemVirtualizerTester.cs
│ │ │ └── TestsWithCommonRepo.cs
│ │ ├── Virtualization/
│ │ │ ├── FileSystemCallbacksTests.cs
│ │ │ └── Projection/
│ │ │ ├── GitIndexEntryTests.cs
│ │ │ ├── LazyUTF8StringTests.cs
│ │ │ ├── ObjectPoolTests.cs
│ │ │ └── SortedFolderEntriesTests.cs
│ │ └── Windows/
│ │ ├── CommandLine/
│ │ │ └── SparseVerbTests.cs
│ │ ├── Mock/
│ │ │ ├── MockVirtualizationInstance.cs
│ │ │ ├── MockWriteBuffer.cs
│ │ │ └── WindowsFileSystemVirtualizerTester.cs
│ │ ├── Platform/
│ │ │ └── ProjFSFilterTests.cs
│ │ ├── Virtualization/
│ │ │ ├── ActiveEnumerationTests.cs
│ │ │ ├── PatternMatcherTests.cs
│ │ │ └── WindowsFileSystemVirtualizerTests.cs
│ │ └── WindowsFileBasedLockTests.cs
│ ├── GVFS.VirtualFileSystemHook/
│ │ ├── GVFS.VirtualFileSystemHook.vcxproj
│ │ ├── GVFS.VirtualFileSystemHook.vcxproj.filters
│ │ ├── Version.rc
│ │ ├── main.cpp
│ │ ├── resource.h
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ └── targetver.h
│ ├── GVFS.Virtualization/
│ │ ├── Background/
│ │ │ ├── BackgroundFileSystemTaskRunner.cs
│ │ │ ├── FileSystemTask.cs
│ │ │ ├── FileSystemTaskQueue.cs
│ │ │ └── FileSystemTaskResult.cs
│ │ ├── BlobSize/
│ │ │ ├── BlobSizes.cs
│ │ │ └── BlobSizesException.cs
│ │ ├── FileSystem/
│ │ │ ├── FSResult.cs
│ │ │ ├── FileSystemResult.cs
│ │ │ ├── FileSystemVirtualizer.cs
│ │ │ ├── UpdateFailureReason.cs
│ │ │ └── UpdatePlaceholderType.cs
│ │ ├── FileSystemCallbacks.cs
│ │ ├── GVFS.Virtualization.csproj
│ │ ├── InternalsVisibleTo.cs
│ │ └── Projection/
│ │ ├── GitIndexProjection.FileData.cs
│ │ ├── GitIndexProjection.FileTypeAndMode.cs
│ │ ├── GitIndexProjection.FolderData.cs
│ │ ├── GitIndexProjection.FolderEntryData.cs
│ │ ├── GitIndexProjection.GitIndexEntry.cs
│ │ ├── GitIndexProjection.GitIndexParser.cs
│ │ ├── GitIndexProjection.LazyUTF8String.cs
│ │ ├── GitIndexProjection.ObjectPool.cs
│ │ ├── GitIndexProjection.PoolAllocationMultipliers.cs
│ │ ├── GitIndexProjection.SortedFolderEntries.cs
│ │ ├── GitIndexProjection.SparseFolder.cs
│ │ ├── GitIndexProjection.cs
│ │ ├── IProfilerOnlyIndexProjection.cs
│ │ ├── ProjectedFileInfo.cs
│ │ ├── Readme.md
│ │ └── SizesUnavailableException.cs
│ └── GitHooksLoader/
│ ├── GitHooksLoader.cpp
│ ├── GitHooksLoader.vcxproj
│ ├── GitHooksLoader.vcxproj.filters
│ ├── Version.rc
│ ├── resource.h
│ ├── stdafx.cpp
│ ├── stdafx.h
│ └── targetver.h
├── GVFS.sln
├── GvFlt_EULA.md
├── License.md
├── Protocol.md
├── Readme.md
├── SECURITY.md
├── ThirdPartyNotices.txt
├── Version.props
├── docs/
│ ├── faq.md
│ ├── getting-started.md
│ ├── index.md
│ └── troubleshooting.md
├── global.json
├── nuget.config
└── scripts/
├── Build.bat
├── CreateBuildArtifacts.bat
├── InitializeEnvironment.bat
├── RunFunctionalTests-Dev.ps1
├── RunFunctionalTests.bat
├── RunUnitTests.bat
├── StopAllServices.bat
└── StopService.bat
================================================
FILE CONTENTS
================================================
================================================
FILE: .azure-pipelines/release.yml
================================================
# NOTE: this pipeline definition is not currently used to build releases of VFS for Git.
# This is still done in the GVFS-Release-RealSign "classic" pipeline.
name: $(date:yy)$(DayOfYear)$(rev:.r)
variables:
signType: test
teamName: GVFS
configuration: Release
signPool: VSEng-MicroBuildVS2019
GVFSMajorAndMinorVersion: 1.0
GVFSRevision: $(Build.BuildNumber)
jobs:
- job: build
displayName: Windows Build and Sign
pool:
name: $(signPool)
steps:
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@2
displayName: Install signing plugin
inputs:
signType: '$(SignType)'
- task: UseDotNet@2
displayName: Install .NET SDK
inputs:
packageType: sdk
version: 8.0.413
- task: CmdLine@2
displayName: Build VFS for Git
inputs:
script: $(Build.Repository.LocalPath)\scripts\Build.bat $(configuration) $(GVFSMajorAndMinorVersion).$(GVFSRevision) detailed
- task: CmdLine@2
displayName: Run unit tests
inputs:
script: $(Build.Repository.LocalPath)\scripts\RunUnitTests.bat $(configuration)
- task: CmdLine@2
displayName: Create build artifacts
inputs:
script: $(Build.Repository.LocalPath)\scripts\CreateBuildArtifacts.bat $(configuration) $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Installer'
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)\NuGetPackages
ArtifactName: Installer
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: FastFetch'
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)\FastFetch
ArtifactName: FastFetch
- task: PublishSymbols@1
displayName: Enable Source Server
condition: eq(succeeded(), eq(variables['signType'], 'real'))
inputs:
SearchPattern: '**\*.pdb'
SymbolsFolder: $(Build.ArtifactStagingDirectory)\Symbols
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Symbols'
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)\Symbols
ArtifactName: Symbols
- task: ms-vscs-artifact.build-tasks.artifactSymbolTask-1.artifactSymbolTask@0
displayName: Publish to Symbols on Symweb
condition: eq(succeeded(), eq(variables['signType'], 'real'))
inputs:
symbolServiceURI: https://microsoft.artifacts.visualstudio.com/DefaultCollection
sourcePath: $(Build.ArtifactStagingDirectory)/Symbols
expirationInDays: 2065
usePat: false
- task: NuGetCommand@2
displayName: Push GVFS.Installers package
condition: eq(succeeded(), eq(variables['signType'], 'real'))
inputs:
command: push
packagesToPush: $(Build.ArtifactStagingDirectory)\NuGetPackages\GVFS.Installers.*.nupkg
nuGetFeedType: external
publishFeedCredentials: '1essharedassets GVFS [PUBLISH]'
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
displayName: Send MicroBuild Telemetry
condition: always()
================================================
FILE: .editorconfig
================================================
# EditorConfig: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*.cs]
trim_trailing_whitespace = true
================================================
FILE: .gitattributes
================================================
###############################################################################
# Do not normalize any line endings.
###############################################################################
* -text
*.cs diff=csharp
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
# especially
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions
version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
================================================
FILE: .github/workflows/build.yaml
================================================
name: VFS for Git
run-name: ${{ inputs.run_name || 'VFS for Git' }}
on:
pull_request:
branches: [ master, releases/shipped ]
push:
branches: [ master, releases/shipped ]
workflow_dispatch:
inputs:
git_version:
description: 'Microsoft Git version tag to include in the build (leave empty for default)'
required: false
type: string
run_name:
description: 'Optional display name for this run (used for cross-repo automation)'
required: false
type: string
permissions:
contents: read
actions: read
env:
GIT_VERSION: ${{ github.event.inputs.git_version || 'v2.53.0.vfs.0.6' }}
jobs:
validate:
runs-on: windows-2025
name: Validation
outputs:
skip: ${{ steps.check.outputs.result }}
steps:
- name: Look for prior successful runs
id: check
if: github.event.inputs.git_version == ''
uses: actions/github-script@v8
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script: |
/*
* It would be nice if GitHub Actions offered a convenient way to avoid running
* successful workflow runs _again_ for the respective commit (or for a tree-same one):
* We would expect the same outcome in those cases, right?
*
* Let's check for such a scenario: Look for previous runs that have been successful
* and that correspond to the same commit, or at least a tree-same one. If there is
* one, skip running the build and tests _again_.
*
* There are challenges, though: We need to require those _jobs_ to succeed before PRs
* can be merged. You can mark workflow _jobs_ as required on GitHub, but not
* _workflows_. So if those jobs are now simply skipped, the requirement isn't met and
* the PR cannot be merged. We can't just skip the job. Instead, we need to run the job
* _but skip every single step_ so that the job can "succeed".
*/
try {
// Figure out workflow ID, commit and tree
const { data: run } = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
});
const workflow_id = run.workflow_id;
const head_sha = run.head_sha;
const tree_id = run.head_commit.tree_id;
// See whether there is a successful run for that commit or tree
const { data: runs } = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 500,
workflow_id,
});
// first look at commit-same runs, then at finished ones, then at in-progress ones
const rank = (a) => (a.status === 'in_progress' ? 0 : (head_sha === a.head_sha ? 2 : 1))
const demoteInProgressToEnd = (a, b) => (rank(b) - rank(a))
for (const run of runs.workflow_runs.sort(demoteInProgressToEnd)) {
if (head_sha !== run.head_sha && tree_id !== run.head_commit?.tree_id) continue
if (context.runId === run.id) continue // do not wait for the current run to finish ;-)
if (run.event === 'workflow_dispatch') continue // skip runs that were started manually: they can override the Git version
if (run.status === 'in_progress') {
// poll until the run is done
const pollIntervalInSeconds = 30
let seconds = 0
for (;;) {
console.log(`Found existing, in-progress run at ${run.html_url}; Waiting for it to finish (waited ${seconds} seconds so far)...`)
await new Promise((resolve) => { setTimeout(resolve, pollIntervalInSeconds * 1000) })
seconds += pollIntervalInSeconds
const { data: polledRun } = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: run.id
})
if (polledRun.status !== 'in_progress') break
}
}
if (run.status === 'completed' && run.conclusion === 'success') {
core.notice(`Skipping: There already is a successful run: ${run.html_url}`)
return run.html_url
}
}
return ''
} catch (e) {
core.error(e)
core.warning(e)
}
- name: Checkout source
if: steps.check.outputs.result == ''
uses: actions/checkout@v6
- name: Validate Microsoft Git version
if: steps.check.outputs.result == ''
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
& "$env:GITHUB_WORKSPACE\.github\workflows\scripts\validate_release.ps1" `
-Repository microsoft/git `
-Tag $env:GIT_VERSION && `
Write-Host ::notice title=Validation::Using microsoft/git version $env:GIT_VERSION
- name: Download microsoft/git installers
if: steps.check.outputs.result == ''
shell: cmd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download %GIT_VERSION% --repo microsoft/git --pattern "Git*.exe" --dir MicrosoftGit
- name: Create Git install script
if: steps.check.outputs.result == ''
shell: cmd
run: |
>MicrosoftGit\install.bat (
echo @ECHO OFF
echo SETLOCAL
echo.
echo IF "%%PROCESSOR_ARCHITECTURE%%"=="AMD64" ^(
echo SET GIT_ARCH=64-bit
echo ^) ELSE IF "%%PROCESSOR_ARCHITECTURE%%"=="ARM64" ^(
echo SET GIT_ARCH=arm64
echo ^) ELSE ^(
echo ECHO Unknown architecture: %%PROCESSOR_ARCHITECTURE%%
echo exit 1
echo ^)
echo.
echo FOR /F "tokens=* USEBACKQ" %%%%F IN ^( `where /R %%~dp0 Git*-%%GIT_ARCH%%.exe` ^) DO SET GIT_INSTALLER=%%%%F
echo.
echo SET LOGDIR=%%~dp0\logs
echo IF EXIST %%LOGDIR%% ^( rmdir /S /Q %%LOGDIR%% ^)
echo mkdir %%LOGDIR%%
echo.
echo ECHO Installing Git ^(%%GIT_ARCH%%^)...
echo %%GIT_INSTALLER%% /LOG="%%LOGDIR%%\git.log" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLOWDOWNGRADE=1
)
- name: Upload microsoft/git installers
if: steps.check.outputs.result == ''
uses: actions/upload-artifact@v7
with:
name: MicrosoftGit
path: MicrosoftGit
build:
runs-on: windows-2025
name: Build and Unit Test
needs: validate
strategy:
matrix:
configuration: [ Debug, Release ]
fail-fast: false
steps:
- name: Skip this job if there is a previous successful run
if: needs.validate.outputs.skip != ''
id: skip
uses: actions/github-script@v8
with:
script: |
core.info(`Skipping: There already is a successful run: ${{ needs.validate.outputs.skip }}`)
return true
- name: Checkout source
if: steps.skip.outputs.result != 'true'
uses: actions/checkout@v6
with:
path: src
- name: Install .NET SDK
if: steps.skip.outputs.result != 'true'
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.413
- name: Add MSBuild to PATH
if: steps.skip.outputs.result != 'true'
uses: microsoft/setup-msbuild@v3.0.0
- name: Build VFS for Git
if: steps.skip.outputs.result != 'true'
shell: cmd
run: src\scripts\Build.bat ${{ matrix.configuration }}
- name: Run unit tests
if: steps.skip.outputs.result != 'true'
shell: cmd
run: src\scripts\RunUnitTests.bat ${{ matrix.configuration }}
- name: Create build artifacts
if: steps.skip.outputs.result != 'true'
shell: cmd
run: src\scripts\CreateBuildArtifacts.bat ${{ matrix.configuration }} artifacts
- name: Upload functional tests drop
if: steps.skip.outputs.result != 'true'
uses: actions/upload-artifact@v7
with:
name: FunctionalTests_${{ matrix.configuration }}
path: artifacts\GVFS.FunctionalTests
- name: Upload FastFetch drop
if: steps.skip.outputs.result != 'true'
uses: actions/upload-artifact@v7
with:
name: FastFetch_${{ matrix.configuration }}
path: artifacts\FastFetch
- name: Upload GVFS installer
if: steps.skip.outputs.result != 'true'
uses: actions/upload-artifact@v7
with:
name: GVFS_${{ matrix.configuration }}
path: artifacts\GVFS.Installers
functional_tests:
name: Functional Tests
needs: [validate, build]
uses: ./.github/workflows/functional-tests.yaml
with:
skip: ${{ needs.validate.outputs.skip }}
result:
runs-on: ubuntu-latest
name: Build, Unit and Functional Tests Successful
needs: [functional_tests]
steps:
- name: Success! # for easier identification of successful runs in the Checks Required for Pull Requests
run: echo "Workflow run is successful!"
================================================
FILE: .github/workflows/functional-tests.yaml
================================================
name: Functional Tests
on:
workflow_call:
inputs:
vfs_repository:
description: 'Repository to download the VFSForGit artifacts from (defaults to the calling repository)'
required: false
type: string
default: ''
vfs_run_id:
description: 'Workflow run ID to download FT executables and GVFS installer from (defaults to the calling run)'
required: false
type: string
default: ''
git_repository:
description: 'Repository to download the Git installer artifact from (defaults to the calling repository)'
required: false
type: string
default: ''
git_run_id:
description: 'Workflow run ID to download the Git installer artifact from (defaults to the calling run)'
required: false
type: string
default: ''
git_artifact_name:
description: 'Name of the artifact containing the Git installer (must include an install.bat script)'
required: false
type: string
default: 'MicrosoftGit'
skip:
description: 'URL of a previous successful run; if non-empty, all steps are skipped (job still succeeds for required checks)'
required: false
type: string
default: ''
output_prefix:
description: 'Prefix for uploaded artifact names (e.g. "VFSForGit" to namespace artifacts in cross-repo runs)'
required: false
type: string
default: ''
secrets:
vfs_token:
description: 'Token for downloading VFSForGit artifacts (required for cross-repository downloads; defaults to GITHUB_TOKEN)'
required: false
git_token:
description: 'Token for downloading the Git installer artifact (required for cross-repository downloads; defaults to GITHUB_TOKEN)'
required: false
permissions:
contents: read
actions: read
jobs:
functional_test:
runs-on: ${{ matrix.architecture == 'arm64' && 'windows-11-arm' || 'windows-2025' }}
name: Test
env:
ARTIFACT_PREFIX: ${{ inputs.output_prefix && format('{0}_', inputs.output_prefix) || '' }}
FT_MATRIX_NAME: ${{ format('{0}_{1}-{2}', matrix.configuration, matrix.architecture, matrix.nr) }}
strategy:
matrix:
configuration: [ Debug, Release ]
architecture: [ x86_64, arm64 ]
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] # 10 parallel jobs to speed up the tests
fail-fast: false # most failures are flaky tests, no need to stop the other jobs from succeeding
steps:
- name: Skip this job if there is a previous successful run
if: inputs.skip != ''
id: skip
uses: actions/github-script@v8
with:
script: |
core.info(`Skipping: There already is a successful run: ${{ inputs.skip }}`)
return true
- name: Download Git installer
if: steps.skip.outputs.result != 'true'
uses: actions/download-artifact@v8
with:
name: ${{ inputs.git_artifact_name }}
path: git
repository: ${{ inputs.git_repository || github.repository }}
run-id: ${{ inputs.git_run_id || github.run_id }}
github-token: ${{ secrets.git_token || github.token }}
- name: Download GVFS installer
if: steps.skip.outputs.result != 'true'
uses: actions/download-artifact@v8
with:
name: GVFS_${{ matrix.configuration }}
path: gvfs
repository: ${{ inputs.vfs_repository || github.repository }}
run-id: ${{ inputs.vfs_run_id || github.run_id }}
github-token: ${{ secrets.vfs_token || github.token }}
- name: Download functional tests drop
if: steps.skip.outputs.result != 'true'
uses: actions/download-artifact@v8
with:
name: FunctionalTests_${{ matrix.configuration }}
path: ft
repository: ${{ inputs.vfs_repository || github.repository }}
run-id: ${{ inputs.vfs_run_id || github.run_id }}
github-token: ${{ secrets.vfs_token || github.token }}
- name: ProjFS details (pre-install)
if: steps.skip.outputs.result != 'true'
shell: cmd
continue-on-error: true
run: gvfs\info.bat
- name: Install Git
if: steps.skip.outputs.result != 'true'
shell: cmd
run: git\install.bat
- name: Install VFS for Git
if: steps.skip.outputs.result != 'true'
shell: cmd
run: gvfs\install.bat
- name: ProjFS details (post-install)
if: steps.skip.outputs.result != 'true'
shell: cmd
continue-on-error: true
run: gvfs\info.bat
- name: Upload installation logs
if: always() && steps.skip.outputs.result != 'true'
uses: actions/upload-artifact@v7
continue-on-error: true
with:
name: ${{ env.ARTIFACT_PREFIX }}InstallationLogs_${{ env.FT_MATRIX_NAME }}
path: |
git\logs
gvfs\logs
- name: Run functional tests
if: steps.skip.outputs.result != 'true'
shell: cmd
run: |
SET PATH=C:\Program Files\VFS for Git;%PATH%
SET GIT_TRACE2_PERF=C:\temp\git-trace2.log
ft\GVFS.FunctionalTests.exe /result:TestResult.xml --ci --slice=${{ matrix.nr }},10
- name: Upload functional test results
if: always() && steps.skip.outputs.result != 'true'
uses: actions/upload-artifact@v7
with:
name: ${{ env.ARTIFACT_PREFIX }}FunctionalTests_Results_${{ env.FT_MATRIX_NAME }}
path: TestResult.xml
- name: Upload Git trace2 output
if: always() && steps.skip.outputs.result != 'true'
uses: actions/upload-artifact@v7
with:
name: ${{ env.ARTIFACT_PREFIX }}GitTrace2_${{ env.FT_MATRIX_NAME }}
path: C:\temp\git-trace2.log
- name: ProjFS details (post-test)
if: always() && steps.skip.outputs.result != 'true'
shell: cmd
continue-on-error: true
run: gvfs\info.bat
================================================
FILE: .github/workflows/release-winget.yaml
================================================
name: "release-winget"
on:
release:
types: [released]
jobs:
release:
runs-on: windows-latest
steps:
- name: Publish manifest with winget-create
run: |
# Get correct release asset
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
$asset = $github.release.assets | Where-Object -Property name -match 'SetupGVFS[\d\.]*.exe'
# Remove 'v' from the version
$version = $github.release.tag_name -replace ".v",""
# Download and run wingetcreate
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
.\wingetcreate.exe update Microsoft.VFSforGit -u $asset.browser_download_url -v $version -o manifests -t "${{ secrets.WINGET_TOKEN }}" -s
shell: powershell
================================================
FILE: .github/workflows/scripts/validate_release.ps1
================================================
param(
[Parameter(Mandatory=$true)]
[string]$Tag,
[Parameter(Mandatory=$true)]
[string]$Repository
)
function Write-GitHubActionsCommand {
param(
[Parameter(Mandatory=$true)]
[string]$Command,
[Parameter(Mandatory=$true)]
[string]$Message,
[Parameter(Mandatory=$true)]
[string]$Title
)
Write-Host "::$Command title=$Title::$Message"
}
function Write-GitHubActionsWarning {
param(
[Parameter(Mandatory=$true)]
[string]$Message,
[Parameter(Mandatory=$false)]
[string]$Title = "Warning"
)
if ($env:GITHUB_ACTIONS -eq "true") {
Write-GitHubActionsCommand -Command "warning" -Message $Message -Title $Title
} else {
Write-Host "! Warning: $Message" -ForegroundColor Yellow
}
}
function Write-GitHubActionsError {
param(
[Parameter(Mandatory=$true)]
[string]$Message,
[Parameter(Mandatory=$false)]
[string]$Title = "Error"
)
if ($env:GITHUB_ACTIONS -eq "true") {
Write-GitHubActionsCommand -Command "error" -Message $Message -Title $Title
} else {
Write-Host "x Error: $Message" -ForegroundColor Red
}
}
if ([string]::IsNullOrWhiteSpace($Tag)) {
Write-GitHubActionsError -Message "Tag parameter is required"
exit 1
}
if ([string]::IsNullOrWhiteSpace($Repository)) {
Write-GitHubActionsError -Message "Repository parameter is required"
exit 1
}
Write-Host "Validating $Repository release '$Tag'..."
# Prepare headers for GitHub API
$headers = @{
'Accept' = 'application/vnd.github.v3+json'
'User-Agent' = 'VFSForGit-Build'
}
if ($env:GITHUB_TOKEN) {
$headers['Authorization'] = "Bearer $env:GITHUB_TOKEN"
}
# Check if the tag exists in microsoft/git repository
try {
$releaseResponse = Invoke-RestMethod `
-Uri "https://api.github.com/repos/$Repository/releases/tags/$Tag" `
-Headers $headers
Write-Host "✓ Tag '$Tag' found in $Repository" -ForegroundColor Green
Write-Host " Release : $($releaseResponse.name)"
Write-Host " Published : $($releaseResponse.published_at.ToString('u'))"
# Check if this a pre-release
if ($releaseResponse.prerelease -eq $true) {
Write-GitHubActionsWarning `
-Message "Using a pre-released version of $Repository" `
-Title "Pre-release $Repository version"
}
# Get the latest release for comparison
try {
$latestResponse = Invoke-RestMethod `
-Uri "https://api.github.com/repos/$Repository/releases/latest" `
-Headers $headers
$latestTag = $latestResponse.tag_name
# Check if this is the latest release
if ($Tag -eq $latestTag) {
Write-Host "✓ Using the latest release" -ForegroundColor Green
exit 0
}
# Not the latest!
$warningTitle = "Outdated $Repository release"
$warningMsg = "Not using latest release of $Repository (latest: $latestTag)"
Write-GitHubActionsWarning -Message $warningMsg -Title $warningTitle
} catch {
Write-GitHubActionsWarning -Message "Could not check latest release info for ${Repository}: $($_.Exception.Message)"
}
} catch {
if ($_.Exception.Response.StatusCode -eq 404) {
Write-GitHubActionsError -Message "Tag '$Tag' does not exist in $Repository"
exit 1
} else {
Write-GitHubActionsError -Message "Error validating release '$Tag': $($_.Exception.Message)"
exit 1
}
}
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# VS 2017 user-specific files
launchSettings.json
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# Mac
xcuserdata
.DS_Store
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
# Visual Studio 2015 cache/options directory
.vs/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
*.VC.opendb
*.VC.db
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
## TODO: Comment the next line if you want to checkin your
## web deploy settings but do note that will include unencrypted
## passwords
#*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
*.dll
*.cab
*.cer
# VS Code private directory
.vscode/
# ProjFS Kext Unit Test coverage results
ProjFS.Mac/CoverageResult.txt
================================================
FILE: .vsconfig
================================================
{
"version": "1.0",
"components": [
"Microsoft.Component.MSBuild",
"Microsoft.Net.Component.4.7.1.TargetingPack",
"Microsoft.Net.Component.4.7.1.SDK",
"Microsoft.Net.Core.Component.SDK.8.0",
"Microsoft.VisualStudio.Component.VC.v143.x86.x64",
"Microsoft.VisualStudio.Component.Windows11SDK.26100",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Workload.NetCoreTools"
]
}
================================================
FILE: AuthoringTests.md
================================================
# Authoring Tests
## Functional Tests
#### Runnable functional test projects
- `GVFS.FunctionalTests`
- `GVFS.FunctionalTests.Windows`
`GVFS.FunctionalTests` is a .NET Core project and contains all cross-platform functional tests. `GVFS.FunctionalTests.Windows`, contains functional tests that require Windows. Additionally, `GVFS.FunctionalTests.Windows` includes all the `GVFS.FunctionalTests` allowing it to run both cross-platform and Windows-specific functional tests.
#### Other functional test projects
*GVFS.NativeTests*
`GVFS.NativeTests` contains tests written in C++ that use the Windows API directly. These tests are called from the managed tests (see above) using PInvoke.
*GVFS.FunctionalTests.LockHolder*
The `LockHolder` is a small program that allows the functional tests to request and release the `GVFSLock`. `LockHolder` is useful for simulating different timing/race conditions.
## Running the Functional Tests
The functional tests are built on NUnit 3, which is available as a set of NuGet packages.
### Windows
1. Build VFS for Git:
**Option 1:** Open GVFS.sln in Visual Studio and build everything.
**Option 2:** Run `Scripts\BuildGVFSForWindows.bat` from the command line
2. Run the VFS4G installer that was built in step 2. This will ensure that ProjFS is properly installed/enabled on your machine, and that VFS4G will be able to find the correct version of the pre/post-command hooks. The installer will be placed in `BuildOutput\GVFS.Installer.Windows\bin\x64\<Debug or Release>`
3. Run the tests **with elevation**. Elevation is required because the functional tests create and delete a test service.
**Option 1:** Run the `GVFS.FunctionalTests.Windows` project from inside Visual Studio launched as Administrator.
**Option 2:** Run `Scripts\RunFunctionalTests.bat` from CMD launched as Administrator.
#### Selecting Which Tests are Run
By default, the functional tests run a subset of tests as a quick smoke test for developers. There are three mutually exclusive arguments that can be passed to the functional tests to change this behavior:
- `--full-suite`: Run all configurations of all functional tests
- `--extra-only`: Run only those tests marked as "ExtraCoverage" (i.e. the tests that are not run by default)
- `--windows-only`: Run only the tests marked as being Windows specific
**NOTE** `Scripts\RunFunctionalTests.bat` already uses some of these arguments. If you run the tests using `RunFunctionalTests.bat` consider locally modifying the script rather than passing these flags as arguments to the script.
### Mac
1. Build VFS for Git: `Scripts/Mac/BuildGVFSForMac.sh`
2. Run the tests: `Scripts/Mac/RunFunctionalTests.sh `
If you need the VS for Mac debugger attached for a functional test run:
1. Make sure you've built your latest changes
2. Run `./ProjFS.Mac/Scripts/LoadPrjFSKext.sh`
3. Open GVFS.sln in VS for Mac
4. Run->Run With->Custom Configuration...
5. Select "Start external program" and specify the published functional test binary (e.g. `/Users/<USERNAME>/Repos/VFSForGit/Publish/GVFS.FunctionalTests`)
6. Specify any desired arguments (e.g. [a specific test](#Running-Specific-Tests) )
7. Run Action -> "Debug - .Net Core Debugger"
8. Click "Debug"
### Customizing the Functional Test Settings
The functional tests take a set of parameters that indicate what paths and URLs to work with. If you want to customize those settings, they
can be found in [`GVFS.FunctionalTests\Settings.cs`](/GVFS/GVFS.FunctionalTests/Settings.cs).
## Running Specific Tests
Specific tests can be run by adding the `--test=<comma separated list of tests>` command line argument to the functional test project/scripts.
Note that the test name must include the class and namespace and that `Debug` or `Release` must be specified when running the functional test scripts.
*Example*
Windows (Script):
`Scripts\RunFunctionalTests.bat Debug --test=GVFS.FunctionalTests.Tests.EnlistmentPerFixture.GitFilesTests.CreateFileTest`
Windows (Visual Studio):
1. Set `GVFS.FunctionalTests.Windows` as StartUp project
2. Project Properties->Debug->Start options->Command line arguments (all on a single line): `--test=GVFS.FunctionalTests.Tests.EnlistmentPerFixture.GitFilesTests.CreateFileTest`
Mac:
`Scripts/Mac/RunFunctionalTests.sh Debug --test=GVFS.FunctionalTests.Tests.EnlistmentPerFixture.GitFilesTests.CreateFileTest`
## How to Write a Functional Test
Each piece of functionality that we add to VFS for Git should have corresponding functional tests that clone a repo, mount the filesystem, and use existing tools and filesystem
APIs to interact with the virtual repo.
Since these are functional tests that can potentially modify the state of files on disk, you need to be careful to make sure each test can run in a clean
environment. There are three base classes that you can derive from when writing your tests. It's also important to put your new class into the same namespace
as the base class, because NUnit treats namespaces like test suites, and we have logic that keys off that for deciding when to create enlistments.
1. `TestsWithLongRunningEnlistment`
Before any test in this namespace is executed, we create a single enlistment and mount VFS for Git. We then run all tests in this namespace that derive
from this base class. Only put tests in here that are purely readonly and will leave the repo in a good state for future tests.
2. `TestsWithEnlistmentPerFixture`
For any test fixture (a fixture is the same as a class in NUnit) that derives from this class, we create an enlistment and mount VFS for Git before running
any of the tests in the fixture, and then we unmount and delete the enlistment after all tests are done (but before any other fixture runs). If you need
to write a sequence of tests that manipulate the same repo, this is the right base class.
3. `TestsWithEnlistmentPerTestCase`
Derive from this class if you need a new enlistment created for each test case. This is the most reliable, but also most expensive option.
## Updating the Remote Test Branch
By default, the functional tests clone `master`, check out the branch "FunctionalTests/YYYYMMDD" (with the day the FunctionalTests branch was created),
and then remove all remote tracking information. This is done to guarantee that remote changes to tip cannot break functional tests. If you need to update
the functional tests to use a new FunctionalTests branch, you'll need to create a new "FunctionalTests/YYYYMMDD" branch and update the `Commitish` setting in `Settings.cs` to have this new branch name.
Once you have verified your scenarios locally you can push the new FunctionalTests branch and then your changes.
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to VFS for Git
Thank you for taking the time to contribute!
## Guidelines
* [Code of Conduct](#code-of-conduct)
* [Design Reviews](#design-reviews)
* [Platform Specific Code](#platform-specific-code)
* [Tracing and Logging](#tracing-and-logging)
* [Error Handling](#error-handling)
* [Background Threads](#background-threads)
* [Coding Conventions](#coding-conventions)
* [Testing](#testing)
## Code of Conduct
This project has adopted the [Microsoft Open Source Code of
Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct
FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
with any additional questions or comments.
## Design Reviews
Architectural changes and new features should start with a design review. It's easier and wastes less time to incorporate feedback at this stage.
The design review process is as follows:
1. Create a pull request that contains a design document in Markdown (.md) format for the proposed change. Assign the `design-doc` label to the pull request.
2. Use the pull request for design feedback and for iterating on the design.
3. Once the design is approved, create a new issue with a description that includes the final design document. Include a link to the pull request that was used for discussion.
4. Close (without merging!) the pull request used for the design discussion.
## Platform Specific Code
- *Prefer cross-platform code to platform-specific code*
Cross-platform code is more easily reused. Reusing code reduces the amount of code that must be written, tested, and maintained.
- *Platform specific code, and only platform specific code, should go in `GVFSPlatform`*
When platform specific code is required, it should be placed in `GVFSPlatform` or one of the platforms it contains (e.g. `IKernelDriver`)
## Tracing and Logging
- *The "Error" logging level is reserved for non-retryable errors that result in I/O failures or the VFS4G process shutting down*
The expectation from our customers is that when VFS4G logs an "Error" level message in its log file either:
* VFS4G had to shut down unexpectedly
* VFS4G encountered an issue severe enough that user-initiated I/O would fail.
- *Log full exception stacks*
Full exception stacks (i.e. `Exception.ToString`) provide more details than the exception message alone (`Exception.Message`). Full exception stacks make root-causing issues easier.
- *Do not display full exception stacks to users*
Exception call stacks are not usually actionable for the user. Users frequently (sometimes incorrectly) assume that VFS4G has crashed when shown a full stack. The full stack *should* be included in VFS4G logs, but *should not* be displayed as part of the error message provided to the user.
- *Include relevant details when logging exceptions*
Sometimes an exception call stack alone is not enough to root cause failures in VFS4G. When catching (or throwing) exceptions, log relevant details that will help diagnose the issue. As a general rule, the closer an exception is caught to where it's thrown, the more relevant details there will be to log.
Example:
```
catch (Exception e)
{
EventMetadata metadata = new EventMetadata();
metadata.Add("Area", "Mount");
metadata.Add(nameof(enlistmentHookPath), enlistmentHookPath);
metadata.Add(nameof(installedHookPath), installedHookPath);
metadata.Add("Exception", e.ToString());
context.Tracer.RelatedError(metadata, $"Failed to compare {hook.Name} version");
}
```
## Error Handling
- *Fail fast: An error or exception that risks data loss or corruption should shut down VFS4G immediately*
Preventing data loss and repository corruption is critical. If an error or exception occurs that could lead to data loss, it's better to shut down VFS4G than keep the repository mounted and risk corruption.
- *Do not catch exceptions that are indicative of a programmer error (e.g. `ArgumentNullException`)*
Any exceptions that result from programmer error (e.g. `ArgumentNullException`) should be discovered as early in the development process as possible. Avoid `catch` statements that would hide these errors (e.g. `catch(Exception)`).
The only exception to this rule is for [unhandled exceptions in background threads](#bgexceptions)
- *Do not use exceptions for normal control flow*
Prefer writing code that does not throw exceptions. The `TryXXX` pattern, for example, avoids the performance costs that come with using exceptions. Additionally, VFS4G typically needs to know exactly where errors occur and handle the errors there. The `TryXXX` pattern helps ensure errors are handled in that fashion.
Example: Handle errors where they occur (good):
```
bool TryDoWorkOnDisk(string fileContents, out string error)
{
if (!TryCreateReadConfig())
{
error = "Failed to read config file";
return false;
}
if (!TryCreateTempFile(fileContents))
{
error = "Failed to create temp file";
return false;
}
if (!TryRenameTempFile())
{
error = "Failed to rename temp file";
if (!TryDeleteTempFile())
{
error += ", and failed to cleanup temp file";
}
return false;
}
error = null;
return true;
}
```
Example: Handle errors in `catch` without knowing where they came from (bad):
```
bool TryDoWorkOnDisk(string fileContents, out string error)
{
try
{
CreateReadConfig();
CreateTempFile(fileContents);
RenameTempFile();
}
catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException)
{
error = "Something went wrong doing work on disk";
try
{
if (TempFileExists())
{
DeleteTempFile();
}
}
catch (Exception e) when (e is IOException || e is UnauthorizedAccessException)
{
error += ", and failed to cleanup temp file";
}
return false;
}
error = null;
return true;
}
```
- *Provide the user with user-actionable messages whenever possible*
Don't tell a user what went wrong. Help the user fix the problem.
Example:
> `"You can only specify --hydrate if the repository is mounted. Run 'gvfs mount' and try again."`
## Background Threads
- *Avoid using the thread pool (and avoid using async)*
`HttpRequestor.SendRequest` makes a [blocking call](https://github.com/Microsoft/VFSForGit/blob/4baa37df6bde2c9a9e1917fc7ce5debd653777c0/GVFS/GVFS.Common/Http/HttpRequestor.cs#L135) to `HttpClient.SendAsync`. That blocking call consumes a thread from the managed thread pool. Until that design changes, the rest of VFS4G must avoid using the thread pool unless absolutely necessary. If the thread pool is required, any long running tasks should be moved to a separate thread managed by VFS4G itself (see [GitMaintenanceQueue](https://github.com/Microsoft/VFSForGit/blob/4baa37df6bde2c9a9e1917fc7ce5debd653777c0/GVFS/GVFS.Common/Maintenance/GitMaintenanceQueue.cs#L19) for an example).
Long-running or blocking work scheduled on the managed thread pool can prevent the normal operation of VFS4G. For example, it could prevent downloading file sizes, loose objects, or file contents in a timely fashion.
- <a id="bgexceptions"></a>*Catch all exceptions on long-running tasks and background threads*
Wrap all code that runs in the background thread in a top-level `try/catch(Exception)`. Any exceptions caught by this handler should be logged, and then VFS4G should be forced to terminate with `Environment.Exit`. It's not safe to allow VFS4G to continue to run after an unhandled exception stops a background thread or long-running task. Testing has shown that `Environment.Exit` consistently terminates the VFS4G mount process regardless of how background threads are started (e.g. native thread, `new Thread()`, `Task.Factory.StartNew()`).
An example of this pattern can be seen in [`BackgroundFileSystemTaskRunner.ProcessBackgroundTasks`](https://github.com/Microsoft/VFSForGit/blob/4baa37df6bde2c9a9e1917fc7ce5debd653777c0/GVFS/GVFS.Virtualization/Background/BackgroundFileSystemTaskRunner.cs#L233).
## Coding Conventions
- *Most C# coding style guidelines are covered by StyleCop*
Fix any StyleCop issues reported in changed code. When adding new projects to VFS4G, be sure that StyleCop is analyzing them as part of the build.
- *Prefer explicit types to interfaces and implicitly typed variables*
Avoid the use of `var` (C#), `dynamic` (C#), and `auto` (C++). Prefer concrete/explicit types to interfaces (e.g. prefer `List` to `IList`).
The VFS4G codebase uses this approach because:
* Interfaces can hide the performance characteristics of their underlying type. For example, an `IDictionary` could be a `SortedList` or a `Dictionary` (or several other data types).
* Interfaces can hide the thread safety (or lack thereof) of their underlying type. For example, an `IDictionary` could be a `Dictionary` or a `ConcurrentDictionary`.
* Explicit types make these performance and thread safety characteristics explicit when reviewing code.
* VFS4G is not a public API and its components are always shipped together. Develoepers are free to make API changes to VFS4G's public methods.
- *Method names start with a verb (e.g. "GetProjectedFolderEntryData" rather than "ProjectedFolderEntryData")*
Starting with a verb in the name improves readability and helps ensure consistency with the rest of the VFS4G codebase.
- *Aim to write self-commenting code. When necessary, comments should give background needed to understand the code.*
Helpful (good) comment:
```
// Order the folders in descending order so that we walk the tree from bottom up.
// Traversing the folders in this order:
// 1. Ensures child folders are deleted before their parents
// 2. Ensures that folders that have been deleted by git
// (but are still in the projection) are found before their
// parent folder is re-expanded (only applies on platforms
// where EnumerationExpandsDirectories is true)
foreach (PlaceholderListDatabase.PlaceholderData folderPlaceholder in placeholderFoldersListCopy.OrderByDescending(x => x.Path))
```
Obvious (bad) comment:
```
// Check if enumeration expands directories on the current platform
if (GVFSPlatform.Instance.KernelDriver.EnumerationExpandsDirectories)
```
- *Add new interfaces when it makes sense for the product, not simply for unit testing*
When a class needs to be mocked (or have a subset of its behavior mocked), prefer using virtual methods instead of adding a new interface. VFS4G uses interfaces when multiple implementations of the interface exist in the product code.
- *Check for `null` using the equality (`==`) and inequality (`!=`) operators rather than `is`*
A corollary to this guideline is that equality/inequality operators that break `null` checks should not be added (see [this post](https://stackoverflow.com/questions/40676426/what-is-the-difference-between-x-is-null-and-x-null) for an example).
- *Use `nameof(...)` rather than hardcoded strings*
Using `nameof` ensures that when methods/variables are renamed the logging of those method/variable names will also be updated. However, hard coded strings are still appropriate when they are used for generating reports and changing the strings would break the reports.
### C/C++
- *Do not use C-style casts. Use C++-style casts.*
C++ style casts (e.g. `static_cast<T>`) more clearly express the intent of the programmer, allow for better validation by the compiler, and are easier to search for in the codebase.
- *Declare static functions at the top of source files*
This ensures that the functions can be called from anywhere inside the file.
- *Do not use namespace `using` statements in header files*
`using` statements inside header files are picked up by all source files that include the headers and can cause unexpected errors if there are name collisions.
- *Prefer `using` to full namespaces in source files*
Example:
```
// Inside MyFavSourceFile.cpp
using std::string;
// Do not use `std::` namespace with `string`
static string s_myString;
```
- *Use a meaningful prefix for "public" free functions, and use the same prefix for all functions in a given header file*
Example:
```
// Functions declared in VirtualizationRoots.h have "VirtualizationRoot_" prefix
bool VirtualizationRoot_IsOnline(VirtualizationRootHandle rootHandle);
// Static helper function in VirtualizationRoots.cpp has no prefix
static VirtualizationRootHandle FindOrDetectRootAtVnode(vnode_t vnode, const FsidInode& vnodeFsidInode);
```
## Testing
- *Add new unit and functional tests when making changes*
Comprehensive tests are essential for maintaining the health and quality of the product. For more details on writing tests see [Authoring Tests](https://github.com/Microsoft/VFSForGit/blob/master/AuthoringTests.md).
- *Functional tests are black-box tests and should not build against any VFS4G product code*
Keeping the code separate helps ensure that bugs in the product code do not compromise the integrity of the functional tests.
### C# Unit Tests
- *Add `ExceptionExpected` to unit tests that are expected to have exceptions*
Example:
```
[TestCase]
[Category(CategoryConstants.ExceptionExpected)]
public void ParseFromLsTreeLine_NullRepoRoot()
```
Unit tests should be tagged with `ExceptionExpected` when either the test code or the product code will throw an exception. `ExceptionExpected` tests are not executed when the debugger is attached, and this prevents developers from having to keep continuing the tests each time exceptions are caught by the debugger.
- *Use a `mock` prefix for absolute file system paths and URLs*
The unit tests should not touch the real file system nor should they reach out to any real URLs. Using `mock:\\` and `mock://` ensures that any product code that was not properly mocked will not interact with the real file system or attempt to contact a real URL.
================================================
FILE: Directory.Build.props
================================================
<Project>
<!-- Import version props -->
<Import Project="Version.props" />
<!-- Common project properties -->
<PropertyGroup>
<RepoPath>$(MSBuildThisFileDirectory)</RepoPath>
<RepoSrcPath>$(RepoPath)</RepoSrcPath>
<RepoOutPath>$(RepoPath)..\out\</RepoOutPath>
<ProjectOutPath>$(RepoOutPath)$(MSBuildProjectName)\</ProjectOutPath>
<BuildPackagesPath>$(RepoPath)..\packages\</BuildPackagesPath>
<!--
Ensure `msbuild /t:restore` restores both PackageReference and
package.config styles of NuGet package references.
Native/C++ projects do not support the new PackageReference style,
but our .NET projects do.
-->
<RestorePackagesConfig>true</RestorePackagesConfig>
</PropertyGroup>
<!-- Managed project properties -->
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<BaseOutputPath>$(ProjectOutPath)bin\</BaseOutputPath>
<BaseIntermediateOutputPath>$(ProjectOutPath)obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<!-- Native project properties -->
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">
<Platform>x64</Platform>
<OutDir>$(ProjectOutPath)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(ProjectOutPath)intermediate\$(Platform)\$(Configuration)\</IntDir>
<GeneratedIncludePath>$(IntDir)include\</GeneratedIncludePath>
<!--
Make sure that we don't accidentally use Windows APIs only available after
Windows 10 build 16299 (aka '1709', 'RS3', and 'Fall Creators Update').
The minimum Windows version that includes the final design of the
Projected File System (ProjFS) APIs was actually Windows 10 version 1809
(build 17763), but VFS for Git also supports using the older design of the
ProjFS APIs from that version.
-->
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
</PropertyGroup>
</Project>
================================================
FILE: Directory.Build.targets
================================================
<Project>
<!-- Define common properties that rely on SDK/props-defined properties -->
<PropertyGroup>
<Version>$(GVFSVersion)</Version>
<!--
We parse this version into System.Version in several places;
we should strip the commit ID from the attribute.
-->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>
<!-- Include custom MSBuild targets/tasks -->
<Import Project="$(MSBuildThisFileDirectory)GVFS\GVFS.MSBuild\GVFS.targets" />
</Project>
================================================
FILE: Directory.Packages.props
================================================
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<!-- CLI -->
<PackageVersion Include="CommandLineParser" Version="2.6.0" />
<!-- Serialization -->
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
<!-- Storage -->
<PackageVersion Include="Microsoft.Data.Sqlite" Version="2.2.4" />
<!-- Compression -->
<PackageVersion Include="SharpZipLib" Version="1.3.3" />
<!-- Git -->
<PackageVersion Include="LibGit2Sharp.NativeBinaries" Version="2.0.322" />
<!-- ProjFS -->
<PackageVersion Include="GVFS.ProjFS" Version="2019.411.1" />
<PackageVersion Include="Microsoft.Windows.ProjFS" Version="1.1.19156.1" />
<!-- Windows -->
<PackageVersion Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
<!-- Build / packaging -->
<PackageVersion Include="GVFS.VCRuntime" Version="0.2.0-build" />
<PackageVersion Include="MicroBuild.Core" Version="0.2.0" />
<PackageVersion Include="Microsoft.Build.Framework" Version="16.0.461" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="16.0.461" />
<PackageVersion Include="Tools.InnoSetup" Version="6.4.3" />
<!-- Testing -->
<PackageVersion Include="Moq" Version="4.10.1" />
<PackageVersion Include="NUnit3TestAdapter" Version="3.13.0" />
<PackageVersion Include="NUnitLite" Version="3.12.0" />
<!--
Future packages: pre-declared for Phase 2+ branches to avoid
merge conflicts on this file. Not yet referenced by any project.
-->
<PackageVersion Include="System.CommandLine" Version="2.0.3" />
<PackageVersion Include="System.IO.Pipes.AccessControl" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
</Project>
================================================
FILE: Directory.Solution.props
================================================
<Project>
<!-- Import common build props for solution builds -->
<Import Project="Directory.Build.props" />
</Project>
================================================
FILE: GVFS/FastFetch/CheckoutPrefetcher.cs
================================================
using GVFS.Common;
using GVFS.Common.Git;
using GVFS.Common.Http;
using GVFS.Common.Prefetch;
using GVFS.Common.Prefetch.Git;
using GVFS.Common.Prefetch.Pipeline;
using GVFS.Common.Tracing;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace FastFetch
{
public class CheckoutPrefetcher : BlobPrefetcher
{
private readonly int checkoutThreadCount;
private readonly bool allowIndexMetadataUpdateFromWorkingTree;
private readonly bool forceCheckout;
public CheckoutPrefetcher(
ITracer tracer,
Enlistment enlistment,
GitObjectsHttpRequestor objectRequestor,
int chunkSize,
int searchThreadCount,
int downloadThreadCount,
int indexThreadCount,
int checkoutThreadCount,
bool allowIndexMetadataUpdateFromWorkingTree,
bool forceCheckout)
: base(
tracer,
enlistment,
objectRequestor,
chunkSize,
searchThreadCount,
downloadThreadCount,
indexThreadCount)
{
this.checkoutThreadCount = checkoutThreadCount;
this.allowIndexMetadataUpdateFromWorkingTree = allowIndexMetadataUpdateFromWorkingTree;
this.forceCheckout = forceCheckout;
}
/// <param name="branchOrCommit">A specific branch to filter for, or null for all branches returned from info/refs</param>
public override void Prefetch(string branchOrCommit, bool isBranch)
{
if (string.IsNullOrWhiteSpace(branchOrCommit))
{
throw new FetchException("Must specify branch or commit to fetch");
}
GitRefs refs = null;
string commitToFetch;
if (isBranch)
{
refs = this.ObjectRequestor.QueryInfoRefs(branchOrCommit);
if (refs == null)
{
throw new FetchException("Could not query info/refs from: {0}", this.Enlistment.RepoUrl);
}
else if (refs.Count == 0)
{
throw new FetchException("Could not find branch {0} in info/refs from: {1}", branchOrCommit, this.Enlistment.RepoUrl);
}
commitToFetch = refs.GetTipCommitId(branchOrCommit);
}
else
{
commitToFetch = branchOrCommit;
}
using (new IndexLock(this.Enlistment.EnlistmentRoot, this.Tracer))
{
this.DownloadMissingCommit(commitToFetch, this.GitObjects);
// Configure pipeline
// Checkout uses DiffHelper when running checkout.Start(), which we use instead of LsTreeHelper
// Checkout diff output => FindBlobs => BatchDownload => IndexPack => Checkout available blobs
CheckoutStage checkout = new CheckoutStage(this.checkoutThreadCount, this.FolderList, commitToFetch, this.Tracer, this.Enlistment, this.forceCheckout);
FindBlobsStage blobFinder = new FindBlobsStage(this.SearchThreadCount, checkout.RequiredBlobs, checkout.AvailableBlobShas, this.Tracer, this.Enlistment);
BatchObjectDownloadStage downloader = new BatchObjectDownloadStage(this.DownloadThreadCount, this.ChunkSize, blobFinder.MissingBlobs, checkout.AvailableBlobShas, this.Tracer, this.Enlistment, this.ObjectRequestor, this.GitObjects);
IndexPackStage packIndexer = new IndexPackStage(this.IndexThreadCount, downloader.AvailablePacks, checkout.AvailableBlobShas, this.Tracer, this.GitObjects);
// Start pipeline
downloader.Start();
blobFinder.Start();
checkout.Start();
blobFinder.WaitForCompletion();
this.HasFailures |= blobFinder.HasFailures;
// Delay indexing. It interferes with FindMissingBlobs, and doesn't help Bootstrapping.
packIndexer.Start();
downloader.WaitForCompletion();
this.HasFailures |= downloader.HasFailures;
packIndexer.WaitForCompletion();
this.HasFailures |= packIndexer.HasFailures;
// Since pack indexer is the last to finish before checkout finishes, it should propagate completion.
// This prevents availableObjects from completing before packIndexer can push its objects through this link.
checkout.AvailableBlobShas.CompleteAdding();
checkout.WaitForCompletion();
this.HasFailures |= checkout.HasFailures;
if (!this.SkipConfigUpdate && !this.HasFailures)
{
bool shouldSignIndex = !this.GetIsIndexSigningOff();
// Update the index - note that this will take some time
EventMetadata updateIndexMetadata = new EventMetadata();
updateIndexMetadata.Add("IndexSigningIsOff", shouldSignIndex);
using (ITracer activity = this.Tracer.StartActivity("UpdateIndex", EventLevel.Informational, Keywords.Telemetry, updateIndexMetadata))
{
Index sourceIndex = this.GetSourceIndex();
GitIndexGenerator indexGen = new GitIndexGenerator(this.Tracer, this.Enlistment, shouldSignIndex);
indexGen.CreateFromRef(commitToFetch, indexVersion: 2, isFinal: false);
this.HasFailures |= indexGen.HasFailures;
if (!indexGen.HasFailures)
{
Index newIndex = new Index(
this.Enlistment.EnlistmentRoot,
this.Tracer,
indexGen.TemporaryIndexFilePath,
readOnly: false);
// Update from disk only if the caller says it is ok via command line
// or if we updated the whole tree and know that all files are up to date
bool allowIndexMetadataUpdateFromWorkingTree = this.allowIndexMetadataUpdateFromWorkingTree || checkout.UpdatedWholeTree;
newIndex.UpdateFileSizesAndTimes(checkout.AddedOrEditedLocalFiles, allowIndexMetadataUpdateFromWorkingTree, shouldSignIndex, sourceIndex);
// All the slow stuff is over, so we will now move the final index into .git\index, shortly followed by
// updating the ref files and releasing index.lock.
string indexPath = Path.Combine(this.Enlistment.DotGitRoot, GVFSConstants.DotGit.IndexName);
this.Tracer.RelatedEvent(EventLevel.Informational, "MoveUpdatedIndexToFinalLocation", new EventMetadata() { { "UpdatedIndex", indexGen.TemporaryIndexFilePath }, { "Index", indexPath } });
File.Delete(indexPath);
File.Move(indexGen.TemporaryIndexFilePath, indexPath);
newIndex.WriteFastFetchIndexVersionMarker();
}
}
if (!this.HasFailures)
{
this.UpdateRefs(branchOrCommit, isBranch, refs);
if (isBranch)
{
// Update the refspec before setting the upstream or git will complain the remote branch doesn't exist
this.HasFailures |= !this.UpdateRefSpec(this.Tracer, this.Enlistment, branchOrCommit, refs);
using (ITracer activity = this.Tracer.StartActivity("SetUpstream", EventLevel.Informational))
{
string remoteBranch = refs.GetBranchRefPairs().Single().Key;
GitProcess git = new GitProcess(this.Enlistment);
GitProcess.Result result = git.SetUpstream(branchOrCommit, remoteBranch);
if (result.ExitCodeIsFailure)
{
activity.RelatedError("Could not set upstream for {0} to {1}: {2}", branchOrCommit, remoteBranch, result.Errors);
this.HasFailures = true;
}
}
}
}
}
}
}
/// <summary>
/// * Updates local branch (N/A for checkout to detached HEAD)
/// * Updates HEAD
/// * Calls base to update shallow file and remote branch.
/// </summary>
protected override void UpdateRefs(string branchOrCommit, bool isBranch, GitRefs refs)
{
if (isBranch)
{
KeyValuePair<string, string> remoteRef = refs.GetBranchRefPairs().Single();
string remoteBranch = remoteRef.Key;
string fullLocalBranchName = branchOrCommit.StartsWith(RefsHeadsGitPath) ? branchOrCommit : (RefsHeadsGitPath + branchOrCommit);
this.HasFailures |= !this.UpdateRef(this.Tracer, fullLocalBranchName, remoteRef.Value);
this.HasFailures |= !this.UpdateRef(this.Tracer, "HEAD", fullLocalBranchName);
}
else
{
this.HasFailures |= !this.UpdateRef(this.Tracer, "HEAD", branchOrCommit);
}
base.UpdateRefs(branchOrCommit, isBranch, refs);
}
private Index GetSourceIndex()
{
string indexPath = Path.Combine(this.Enlistment.DotGitRoot, GVFSConstants.DotGit.IndexName);
if (File.Exists(indexPath))
{
Index output = new Index(this.Enlistment.EnlistmentRoot, this.Tracer, indexPath, readOnly: true);
output.Parse();
return output;
}
return null;
}
private bool GetIsIndexSigningOff()
{
// The first bit of core.gvfs is set if index signing is turned off.
const uint CoreGvfsUnsignedIndexFlag = 1;
GitProcess git = new GitProcess(this.Enlistment);
GitProcess.ConfigResult configCoreGvfs = git.GetFromConfig("core.gvfs");
string coreGvfs;
string error;
if (!configCoreGvfs.TryParseAsString(out coreGvfs, out error))
{
return false;
}
uint valueCoreGvfs;
// No errors getting the configuration and it is either "true" or numeric with the right bit set.
return !string.IsNullOrEmpty(coreGvfs) &&
(coreGvfs.Equals("true", StringComparison.OrdinalIgnoreCase) ||
(uint.TryParse(coreGvfs, out valueCoreGvfs) &&
((valueCoreGvfs & CoreGvfsUnsignedIndexFlag) == CoreGvfsUnsignedIndexFlag)));
}
}
}
================================================
FILE: GVFS/FastFetch/CheckoutStage.cs
================================================
using GVFS.Common;
using GVFS.Common.FileSystem;
using GVFS.Common.Git;
using GVFS.Common.Prefetch.Git;
using GVFS.Common.Prefetch.Pipeline;
using GVFS.Common.Tracing;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace FastFetch
{
public class CheckoutStage : PrefetchPipelineStage
{
private const string AreaPath = nameof(CheckoutStage);
private const int NumOperationsPerStatus = 10000;
private ITracer tracer;
private Enlistment enlistment;
private PhysicalFileSystem fileSystem;
private string targetCommitSha;
private bool forceCheckout;
private DiffHelper diff;
private int directoryOpCount = 0;
private int fileDeleteCount = 0;
private int fileWriteCount = 0;
private long bytesWritten = 0;
private long shasReceived = 0;
// Checkout requires synchronization between the delete/directory/add stages, so control the parallelization
private int maxParallel;
public CheckoutStage(int maxParallel, IEnumerable<string> folderList, string targetCommitSha, ITracer tracer, Enlistment enlistment, bool forceCheckout)
: base(maxParallel: 1)
{
this.tracer = tracer.StartActivity(AreaPath, EventLevel.Informational, Keywords.Telemetry, metadata: null);
this.enlistment = enlistment;
this.fileSystem = new PhysicalFileSystem();
this.diff = new DiffHelper(tracer, enlistment, new string[0], folderList, includeSymLinks: true);
this.targetCommitSha = targetCommitSha;
this.forceCheckout = forceCheckout;
this.AvailableBlobShas = new BlockingCollection<string>();
// Keep track of how parallel we're expected to be later during DoWork
// Note that '1' is passed to the base object, forcing DoWork to be single threaded
// This allows us to control the synchronization between stages by doing the parallization ourselves
this.maxParallel = maxParallel;
}
public BlockingCollection<string> RequiredBlobs
{
get { return this.diff.RequiredBlobs; }
}
public BlockingCollection<string> AvailableBlobShas { get; }
public bool UpdatedWholeTree
{
get { return this.diff.UpdatedWholeTree; }
}
public BlockingCollection<string> AddedOrEditedLocalFiles { get; } = new BlockingCollection<string>();
protected override void DoBeforeWork()
{
if (this.forceCheckout)
{
// Force search the entire tree by treating the repo as if it were brand new.
this.diff.PerformDiff(sourceTreeSha: null, targetTreeSha: this.targetCommitSha);
}
else
{
// Let the diff find the sourceTreeSha on its own.
this.diff.PerformDiff(this.targetCommitSha);
}
this.HasFailures = this.diff.HasFailures;
}
protected override void DoWork()
{
// Do the delete operations first as they can't have dependencies on other work
using (ITracer activity = this.tracer.StartActivity(
nameof(this.HandleAllFileDeleteOperations),
EventLevel.Informational,
Keywords.Telemetry,
metadata: null))
{
Parallel.For(0, this.maxParallel, (i) => { this.HandleAllFileDeleteOperations(); });
EventMetadata metadata = new EventMetadata();
metadata.Add("FilesDeleted", this.fileDeleteCount);
activity.Stop(metadata);
}
// Do directory operations after deletes in case a file delete must be done first
using (ITracer activity = this.tracer.StartActivity(
nameof(this.HandleAllDirectoryOperations),
EventLevel.Informational,
Keywords.Telemetry,
metadata: null))
{
Parallel.For(0, this.maxParallel, (i) => { this.HandleAllDirectoryOperations(); });
EventMetadata metadata = new EventMetadata();
metadata.Add("DirectoryOperationsCompleted", this.directoryOpCount);
activity.Stop(metadata);
}
// Do add operations last, after all deletes and directories have been created
using (ITracer activity = this.tracer.StartActivity(
nameof(this.HandleAllFileAddOperations),
EventLevel.Informational,
Keywords.Telemetry,
metadata: null))
{
Parallel.For(0, this.maxParallel, (i) => { this.HandleAllFileAddOperations(); });
EventMetadata metadata = new EventMetadata();
metadata.Add("FilesWritten", this.fileWriteCount);
activity.Stop(metadata);
}
}
protected override void DoAfterWork()
{
// If for some reason a blob doesn't become available,
// checkout might complete with file writes still left undone.
if (this.diff.FileAddOperations.Count > 0)
{
this.HasFailures = true;
EventMetadata errorMetadata = new EventMetadata();
if (this.diff.FileAddOperations.Count < 10)
{
errorMetadata.Add("RemainingShas", string.Join(",", this.diff.FileAddOperations.Keys));
}
else
{
errorMetadata.Add("RemainingShaCount", this.diff.FileAddOperations.Count);
}
this.tracer.RelatedError(errorMetadata, "Not all file writes were completed");
}
this.AddedOrEditedLocalFiles.CompleteAdding();
EventMetadata metadata = new EventMetadata();
metadata.Add("DirectoryOperations", this.directoryOpCount);
metadata.Add("FileDeletes", this.fileDeleteCount);
metadata.Add("FileWrites", this.fileWriteCount);
metadata.Add("BytesWritten", this.bytesWritten);
metadata.Add("ShasReceived", this.shasReceived);
this.tracer.Stop(metadata);
}
private void HandleAllDirectoryOperations()
{
DiffTreeResult treeOp;
while (this.diff.DirectoryOperations.TryDequeue(out treeOp))
{
string absoluteTargetPath = Path.Combine(this.enlistment.WorkingDirectoryBackingRoot, treeOp.TargetPath);
if (this.HasFailures)
{
return;
}
switch (treeOp.Operation)
{
case DiffTreeResult.Operations.Modify:
case DiffTreeResult.Operations.Add:
try
{
Directory.CreateDirectory(absoluteTargetPath);
}
catch (Exception ex)
{
EventMetadata metadata = new EventMetadata();
metadata.Add("Operation", "CreateDirectory");
metadata.Add(nameof(treeOp.TargetPath), absoluteTargetPath);
this.tracer.RelatedError(metadata, ex.Message);
this.HasFailures = true;
}
break;
case DiffTreeResult.Operations.Delete:
try
{
if (Directory.Exists(absoluteTargetPath))
{
this.fileSystem.DeleteDirectory(absoluteTargetPath);
}
}
catch (Exception ex)
{
// We are deleting directories and subdirectories in parallel
if (Directory.Exists(absoluteTargetPath))
{
EventMetadata metadata = new EventMetadata();
metadata.Add("Operation", "DeleteDirectory");
metadata.Add(nameof(treeOp.TargetPath), absoluteTargetPath);
this.tracer.RelatedError(metadata, ex.Message);
this.HasFailures = true;
}
}
break;
default:
this.tracer.RelatedError("Ignoring unexpected Tree Operation {0}: {1}", absoluteTargetPath, treeOp.Operation);
continue;
}
if (Interlocked.Increment(ref this.directoryOpCount) % NumOperationsPerStatus == 0)
{
EventMetadata metadata = new EventMetadata();
metadata.Add("DirectoryOperationsQueued", this.diff.DirectoryOperations.Count);
metadata.Add("DirectoryOperationsCompleted", this.directoryOpCount);
this.tracer.RelatedEvent(EventLevel.Informational, "CheckoutStatus", metadata);
}
}
}
private void HandleAllFileDeleteOperations()
{
string path;
while (this.diff.FileDeleteOperations.TryDequeue(out path))
{
if (this.HasFailures)
{
return;
}
try
{
if (File.Exists(path))
{
File.Delete(path);
}
Interlocked.Increment(ref this.fileDeleteCount);
}
catch (Exception ex)
{
EventMetadata metadata = new EventMetadata();
metadata.Add("Operation", "DeleteFile");
metadata.Add("Path", path);
this.tracer.RelatedError(metadata, ex.Message);
this.HasFailures = true;
}
}
}
private void HandleAllFileAddOperations()
{
using (FastFetchLibGit2Repo repo = new FastFetchLibGit2Repo(this.tracer, this.enlistment.WorkingDirectoryBackingRoot))
{
string availableBlob;
while (this.AvailableBlobShas.TryTake(out availableBlob, Timeout.Infinite))
{
if (this.HasFailures)
{
return;
}
Interlocked.Increment(ref this.shasReceived);
HashSet<PathWithMode> paths;
if (this.diff.FileAddOperations.TryRemove(availableBlob, out paths))
{
try
{
long written;
if (!repo.TryCopyBlobToFile(availableBlob, paths, out written))
{
// TryCopyBlobTo emits an error event.
this.HasFailures = true;
}
Interlocked.Add(ref this.bytesWritten, written);
foreach (PathWithMode modeAndPath in paths)
{
this.AddedOrEditedLocalFiles.Add(modeAndPath.Path);
if (Interlocked.Increment(ref this.fileWriteCount) % NumOperationsPerStatus == 0)
{
EventMetadata metadata = new EventMetadata();
metadata.Add("AvailableBlobsQueued", this.AvailableBlobShas.Count);
metadata.Add("NumberBlobsNeeded", this.diff.FileAddOperations.Count);
this.tracer.RelatedEvent(EventLevel.Informational, "CheckoutStatus", metadata);
}
}
}
catch (Exception ex)
{
EventMetadata errorData = new EventMetadata();
errorData.Add("Operation", "WriteFile");
this.tracer.RelatedError(errorData, ex.ToString());
this.HasFailures = true;
}
}
}
}
}
}
}
================================================
FILE: GVFS/FastFetch/FastFetch.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net471</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\GVFS.Platform.Windows\GVFS.Platform.Windows.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" />
<PackageReference Include="MicroBuild.Core" ExcludeAssets="none" />
</ItemGroup>
<ItemGroup>
<FilesToSign Include="
$(OutputPath)\FastFetch.exe;
$(OutputPath)\GVFS.Common.dll;
$(OutputPath)\GVFS.Platform.Windows.dll;
$(OutputPath)\GVFS.Virtualization.dll;">
<Authenticode>Microsoft400</Authenticode>
<InProject>false</InProject>
</FilesToSign>
</ItemGroup>
</Project>
================================================
FILE: GVFS/FastFetch/FastFetchLibGit2Repo.cs
================================================
using GVFS.Common.Git;
using GVFS.Common.Prefetch.Git;
using GVFS.Common.Tracing;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
namespace FastFetch
{
public class FastFetchLibGit2Repo : LibGit2Repo
{
public FastFetchLibGit2Repo(ITracer tracer, string repoPath)
: base(tracer, repoPath)
{
}
public virtual bool TryCopyBlobToFile(string sha, IEnumerable<PathWithMode> destinations, out long bytesWritten)
{
IntPtr objHandle;
if (Native.RevParseSingle(out objHandle, this.RepoHandle, sha) != Native.ResultCode.Success)
{
bytesWritten = 0;
EventMetadata metadata = new EventMetadata();
metadata.Add("ObjectSha", sha);
this.Tracer.RelatedError(metadata, "Couldn't find object");
return false;
}
try
{
// Avoid marshalling raw content by using byte* and native writes
unsafe
{
switch (Native.Object.GetType(objHandle))
{
case Native.ObjectTypes.Blob:
byte* originalData = Native.Blob.GetRawContent(objHandle);
long originalSize = Native.Blob.GetRawSize(objHandle);
foreach (PathWithMode destination in destinations)
{
NativeMethods.WriteFile(this.Tracer, originalData, originalSize, destination.Path, destination.Mode);
}
bytesWritten = originalSize * destinations.Count();
break;
default:
throw new NotSupportedException("Copying object types other than blobs is not supported.");
}
}
}
finally
{
Native.Object.Free(objHandle);
}
return true;
}
}
}
================================================
FILE: GVFS/FastFetch/FastFetchVerb.cs
================================================
using CommandLine;
using GVFS.Common;
using GVFS.Common.Git;
using GVFS.Common.Http;
using GVFS.Common.Prefetch;
using GVFS.Common.Tracing;
using System;
namespace FastFetch
{
[Verb("fastfetch", HelpText = "Fast-fetch a branch")]
public class FastFetchVerb
{
// Testing has shown that more than 16 download threads does not improve
// performance even with 56 core machines with 40G NICs. More threads does
// create more load on the servers as they have to handle extra connections.
private const int MaxDefaultDownloadThreads = 16;
private const int ExitFailure = 1;
private const int ExitSuccess = 0;
[Option(
'c',
"commit",
Required = false,
HelpText = "Commit to fetch")]
public string Commit { get; set; }
[Option(
'b',
"branch",
Required = false,
HelpText = "Branch to fetch")]
public string Branch { get; set; }
[Option(
"cache-server-url",
Required = false,
Default = "",
HelpText = "Defines the url of the cache server")]
public string CacheServerUrl { get; set; }
[Option(
"chunk-size",
Required = false,
Default = 4000,
HelpText = "Sets the number of objects to be downloaded in a single pack")]
public int ChunkSize { get; set; }
[Option(
"checkout",
Required = false,
Default = false,
HelpText = "Checkout the target commit into the working directory after fetching")]
public bool Checkout { get; set; }
[Option(
"force-checkout",
Required = false,
Default = false,
HelpText = "Force FastFetch to checkout content as if the current repo had just been initialized." +
"This allows you to include more folders from the repo that were not originally checked out." +
"Can only be used with the --checkout option.")]
public bool ForceCheckout { get; set; }
[Option(
"search-thread-count",
Required = false,
Default = 0,
HelpText = "Sets the number of threads to use for finding missing blobs. (0 for number of logical cores)")]
public int SearchThreadCount { get; set; }
[Option(
"download-thread-count",
Required = false,
Default = 0,
HelpText = "Sets the number of threads to use for downloading. (0 for number of logical cores)")]
public int DownloadThreadCount { get; set; }
[Option(
"index-thread-count",
Required = false,
Default = 0,
HelpText = "Sets the number of threads to use for indexing. (0 for number of logical cores)")]
public int IndexThreadCount { get; set; }
[Option(
"checkout-thread-count",
Required = false,
Default = 0,
HelpText = "Sets the number of threads to use for checkout. (0 for number of logical cores)")]
public int CheckoutThreadCount { get; set; }
[Option(
'r',
"max-retries",
Required = false,
Default = 10,
HelpText = "Sets the maximum number of attempts for downloading a pack")]
public int MaxAttempts { get; set; }
[Option(
"git-path",
Default = "",
Required = false,
HelpText = "Sets the path and filename for git.exe if it isn't expected to be on %PATH%.")]
public string GitBinPath { get; set; }
[Option(
"folders",
Required = false,
Default = "",
HelpText = "A semicolon-delimited list of folders to fetch")]
public string FolderList { get; set; }
[Option(
"folders-list",
Required = false,
Default = "",
HelpText = "A file containing line-delimited list of folders to fetch")]
public string FolderListFile { get; set; }
[Option(
"Allow-index-metadata-update-from-working-tree",
Required = false,
Default = false,
HelpText = "When specified, index metadata (file times and sizes) is updated from disk if not already in the index. " +
"This flag should only be used when the working tree is known to be in a good state. " +
"Do not use this flag if the working tree is not 100% known to be good as it would cause 'git status' to misreport.")]
public bool AllowIndexMetadataUpdateFromWorkingTree { get; set; }
[Option(
"verbose",
Required = false,
Default = false,
HelpText = "Show all outputs on the console in addition to writing them to a log file")]
public bool Verbose { get; set; }
[Option(
"parent-activity-id",
Required = false,
Default = "",
HelpText = "The GUID of the caller - used for telemetry purposes.")]
public string ParentActivityId { get; set; }
public void Execute()
{
Environment.ExitCode = this.ExecuteWithExitCode();
}
private int ExecuteWithExitCode()
{
// CmdParser doesn't strip quotes, and Path.Combine will throw
this.GitBinPath = this.GitBinPath.Replace("\"", string.Empty);
if (!GVFSPlatform.Instance.GitInstallation.GitExists(this.GitBinPath))
{
Console.WriteLine(
"Could not find git.exe {0}",
!string.IsNullOrWhiteSpace(this.GitBinPath) ? "at " + this.GitBinPath : "on %PATH%");
return ExitFailure;
}
if (this.Commit != null && this.Branch != null)
{
Console.WriteLine("Cannot specify both a commit sha and a branch name.");
return ExitFailure;
}
if (this.ForceCheckout && !this.Checkout)
{
Console.WriteLine("Cannot use --force-checkout option without --checkout option.");
return ExitFailure;
}
this.SearchThreadCount = this.SearchThreadCount > 0 ? this.SearchThreadCount : Environment.ProcessorCount;
this.DownloadThreadCount = this.DownloadThreadCount > 0 ? this.DownloadThreadCount : Math.Min(Environment.ProcessorCount, MaxDefaultDownloadThreads);
this.IndexThreadCount = this.IndexThreadCount > 0 ? this.IndexThreadCount : Environment.ProcessorCount;
this.CheckoutThreadCount = this.CheckoutThreadCount > 0 ? this.CheckoutThreadCount : Environment.ProcessorCount;
this.GitBinPath = !string.IsNullOrWhiteSpace(this.GitBinPath) ? this.GitBinPath : GVFSPlatform.Instance.GitInstallation.GetInstalledGitBinPath();
GitEnlistment enlistment = GitEnlistment.CreateFromCurrentDirectory(this.GitBinPath);
if (enlistment == null)
{
Console.WriteLine("Must be run within a git repo");
return ExitFailure;
}
string commitish = this.Commit ?? this.Branch;
if (string.IsNullOrWhiteSpace(commitish))
{
GitProcess.Result result = new GitProcess(enlistment).GetCurrentBranchName();
if (result.ExitCodeIsFailure || string.IsNullOrWhiteSpace(result.Output))
{
Console.WriteLine("Could not retrieve current branch name: " + result.Errors);
return ExitFailure;
}
commitish = result.Output.Trim();
}
Guid parentActivityId = Guid.Empty;
if (!string.IsNullOrWhiteSpace(this.ParentActivityId) && !Guid.TryParse(this.ParentActivityId, out parentActivityId))
{
Console.WriteLine("The ParentActivityId provided (" + this.ParentActivityId + ") is not a valid GUID.");
}
using (JsonTracer tracer = new JsonTracer("Microsoft.Git.FastFetch", parentActivityId, "FastFetch", enlistmentId: null, mountId: null, disableTelemetry: true))
{
if (this.Verbose)
{
tracer.AddDiagnosticConsoleEventListener(EventLevel.Informational, Keywords.Any);
}
else
{
tracer.AddPrettyConsoleEventListener(EventLevel.Error, Keywords.Any);
}
string fastfetchLogFile = Enlistment.GetNewLogFileName(enlistment.FastFetchLogRoot, "fastfetch");
tracer.AddLogFileEventListener(fastfetchLogFile, EventLevel.Informational, Keywords.Any);
CacheServerInfo cacheServer = new CacheServerInfo(this.GetRemoteUrl(enlistment), null);
tracer.WriteStartEvent(
enlistment.EnlistmentRoot,
enlistment.RepoUrl,
cacheServer.Url,
new EventMetadata
{
{ "TargetCommitish", commitish },
{ "Checkout", this.Checkout },
});
string error;
if (!enlistment.Authentication.TryInitialize(tracer, enlistment, out error))
{
tracer.RelatedError(error);
Console.WriteLine(error);
return ExitFailure;
}
RetryConfig retryConfig = new RetryConfig(this.MaxAttempts, TimeSpan.FromMinutes(RetryConfig.FetchAndCloneTimeoutMinutes));
BlobPrefetcher prefetcher = this.GetFolderPrefetcher(tracer, enlistment, cacheServer, retryConfig);
if (!BlobPrefetcher.TryLoadFolderList(enlistment, this.FolderList, this.FolderListFile, prefetcher.FolderList, readListFromStdIn: false, error: out error))
{
tracer.RelatedError(error);
Console.WriteLine(error);
return ExitFailure;
}
bool isSuccess;
try
{
Func<bool> doPrefetch =
() =>
{
try
{
bool isBranch = this.Commit == null;
prefetcher.Prefetch(commitish, isBranch);
return !prefetcher.HasFailures;
}
catch (BlobPrefetcher.FetchException e)
{
tracer.RelatedError(e.Message);
return false;
}
};
if (this.Verbose)
{
isSuccess = doPrefetch();
}
else
{
isSuccess = ConsoleHelper.ShowStatusWhileRunning(
doPrefetch,
"Fetching",
output: Console.Out,
showSpinner: !Console.IsOutputRedirected,
gvfsLogEnlistmentRoot: null);
Console.WriteLine();
Console.WriteLine("See the full log at " + fastfetchLogFile);
}
isSuccess &= !prefetcher.HasFailures;
}
catch (AggregateException e)
{
isSuccess = false;
foreach (Exception ex in e.Flatten().InnerExceptions)
{
tracer.RelatedError(ex.ToString());
}
}
catch (Exception e)
{
isSuccess = false;
tracer.RelatedError(e.ToString());
}
EventMetadata stopMetadata = new EventMetadata();
stopMetadata.Add("Success", isSuccess);
tracer.Stop(stopMetadata);
return isSuccess ? ExitSuccess : ExitFailure;
}
}
private string GetRemoteUrl(Enlistment enlistment)
{
if (!string.IsNullOrWhiteSpace(this.CacheServerUrl))
{
return this.CacheServerUrl;
}
string configuredUrl = CacheServerResolver.GetUrlFromConfig(enlistment);
if (!string.IsNullOrWhiteSpace(configuredUrl))
{
return configuredUrl;
}
return enlistment.RepoUrl;
}
private BlobPrefetcher GetFolderPrefetcher(ITracer tracer, Enlistment enlistment, CacheServerInfo cacheServer, RetryConfig retryConfig)
{
GitObjectsHttpRequestor objectRequestor = new GitObjectsHttpRequestor(tracer, enlistment, cacheServer, retryConfig);
if (this.Checkout)
{
return new CheckoutPrefetcher(
tracer,
enlistment,
objectRequestor,
this.ChunkSize,
this.SearchThreadCount,
this.DownloadThreadCount,
this.IndexThreadCount,
this.CheckoutThreadCount,
this.AllowIndexMetadataUpdateFromWorkingTree,
this.ForceCheckout);
}
else
{
return new BlobPrefetcher(
tracer,
enlistment,
objectRequestor,
this.ChunkSize,
this.SearchThreadCount,
this.DownloadThreadCount,
this.IndexThreadCount);
}
}
}
}
================================================
FILE: GVFS/FastFetch/GitEnlistment.cs
================================================
using GVFS.Common;
using System;
using System.IO;
namespace FastFetch
{
public class GitEnlistment : Enlistment
{
private GitEnlistment(string repoRoot, string gitBinPath)
: base(
repoRoot,
repoRoot,
repoRoot,
null,
gitBinPath,
flushFileBuffersForPacks: false,
authentication: null)
{
this.GitObjectsRoot = Path.Combine(repoRoot, GVFSConstants.DotGit.Objects.Root);
this.LocalObjectsRoot = this.GitObjectsRoot;
this.GitPackRoot = Path.Combine(this.GitObjectsRoot, GVFSConstants.DotGit.Objects.Pack.Name);
}
public override string GitObjectsRoot { get; protected set; }
public override string LocalObjectsRoot { get; protected set; }
public override string GitPackRoot { get; protected set; }
public string FastFetchLogRoot
{
get { return Path.Combine(this.EnlistmentRoot, GVFSConstants.DotGit.Root, ".fastfetch"); }
}
public static GitEnlistment CreateFromCurrentDirectory(string gitBinPath)
{
string root = Paths.GetGitEnlistmentRoot(Environment.CurrentDirectory);
if (root != null)
{
return new GitEnlistment(root, gitBinPath);
}
return null;
}
}
}
================================================
FILE: GVFS/FastFetch/Index.cs
================================================
using GVFS.Common;
using GVFS.Common.Git;
using GVFS.Common.Tracing;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.IO.MemoryMappedFiles;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace FastFetch
{
public class Index
{
// This versioning number lets us track compatibility with previous
// versions of FastFetch regarding the index. This should be bumped
// when the index older versions of fastfetch created may not be compatible
private const int CurrentFastFetchIndexVersion = 1;
// Constants used for parsing an index entry
private const ushort ExtendedBit = 0x4000;
private const ushort SkipWorktreeBit = 0x4000;
private const int BaseEntryLength = 62;
// Buffer used to get path from index entry
private const int MaxPathBufferSize = 4096;
// Index default names
private const string UpdatedIndexName = "index.updated";
private static readonly byte[] MagicSignature = new byte[] { (byte)'D', (byte)'I', (byte)'R', (byte)'C' };
// Location of the version marker file
private readonly string versionMarkerFile;
private readonly bool readOnly;
private readonly string indexPath;
private readonly ITracer tracer;
private readonly string repoRoot;
private Dictionary<string, long> indexEntryOffsets;
private uint entryCount;
/// <summary>
/// Creates a new Index object to parse the specified index file
/// </summary>
public Index(
string repoRoot,
ITracer tracer,
string indexFullPath,
bool readOnly)
{
this.tracer = tracer;
this.repoRoot = repoRoot;
this.indexPath = indexFullPath;
this.readOnly = readOnly;
this.versionMarkerFile = Path.Combine(this.repoRoot, GVFSConstants.DotGit.Root, ".fastfetch", "VersionMarker");
}
public uint IndexVersion { get; private set; }
/// <summary>
/// Updates entries in the current index with file sizes and times
/// Algorithm:
/// 1) If there was an index in place when this object was constructed, then:
/// a) Copy all valid entries (below) from the previous index to the new index
/// b) Conditionally (below) get times/sizes from the working tree for files not updated from the previous index
///
/// 2) If there was no index in place, conditionally populate all entries from disk
///
/// Conditions:
/// - Working tree is only searched if allowUpdateFromWorkingTree is specified
/// - A valid entry is an entry that exist and has a non-zero creation time (ctime)
/// </summary>
/// <param name="addedOrEditedLocalFiles">A collection of added or edited files</param>
/// <param name="allowUpdateFromWorkingTree">Set to true if the working tree is known good and can be used during the update.</param>
/// <param name="sourceIndex">An optional index to source entry values from</param>
public void UpdateFileSizesAndTimes(BlockingCollection<string> addedOrEditedLocalFiles, bool allowUpdateFromWorkingTree, bool shouldSignIndex, Index sourceIndex = null)
{
if (this.readOnly)
{
throw new InvalidOperationException("Cannot update a readonly index.");
}
using (ITracer activity = this.tracer.StartActivity("UpdateFileSizesAndTimes", EventLevel.Informational, Keywords.Telemetry, null))
{
this.Parse();
bool anyEntriesUpdated = false;
using (MemoryMappedFile mmf = this.GetMemoryMappedFile())
using (MemoryMappedViewAccessor indexView = mmf.CreateViewAccessor())
{
// Only populate from the previous index if we believe it's good to populate from
// For now, a current FastFetch version marker is the only criteria
if (sourceIndex != null)
{
if (this.IsFastFetchVersionMarkerCurrent())
{
using (this.tracer.StartActivity("UpdateFileInformationFromPreviousIndex", EventLevel.Informational, Keywords.Telemetry, null))
{
anyEntriesUpdated |= this.UpdateFileInformationForAllEntries(indexView, sourceIndex, allowUpdateFromWorkingTree);
}
if (addedOrEditedLocalFiles != null)
{
// always update these files from disk or the index won't have good information
// for them and they'll show as modified even those not actually modified.
anyEntriesUpdated |= this.UpdateFileInformationFromDiskForFiles(indexView, addedOrEditedLocalFiles);
}
}
}
else if (allowUpdateFromWorkingTree)
{
// If we didn't update from a previous index, update from the working tree if allowed.
anyEntriesUpdated |= this.UpdateFileInformationFromWorkingTree(indexView);
}
indexView.Flush();
}
if (shouldSignIndex)
{
this.SignIndex();
}
}
}
public void Parse()
{
using (ITracer activity = this.tracer.StartActivity("ParseIndex", EventLevel.Informational, Keywords.Telemetry, new EventMetadata() { { "Index", this.indexPath } }))
{
using (Stream indexStream = new FileStream(this.indexPath, FileMode.Open, FileAccess.Read, FileShare.Read))
{
this.ParseIndex(indexStream);
}
}
}
private static string FromDotnetFullPathToGitRelativePath(string path, string repoRoot)
{
return path.Substring(repoRoot.Length).TrimStart(Path.DirectorySeparatorChar).Replace(Path.DirectorySeparatorChar, GVFSConstants.GitPathSeparator);
}
private static string FromGitRelativePathToDotnetFullPath(string path, string repoRoot)
{
return Path.Combine(repoRoot, path.Replace(GVFSConstants.GitPathSeparator, Path.DirectorySeparatorChar));
}
private MemoryMappedFile GetMemoryMappedFile()
{
return MemoryMappedFile.CreateFromFile(this.indexPath, FileMode.Open);
}
private bool UpdateFileInformationFromWorkingTree(MemoryMappedViewAccessor indexView)
{
long updatedEntries = 0;
using (ITracer activity = this.tracer.StartActivity("UpdateFileInformationFromWorkingTree", EventLevel.Informational, Keywords.Telemetry, null))
{
WorkingTree.ForAllFiles(
this.repoRoot,
(path, files) =>
{
foreach (FileInfo file in files)
{
string gitPath = FromDotnetFullPathToGitRelativePath(file.FullName, this.repoRoot);
long offset;
if (this.indexEntryOffsets.TryGetValue(gitPath, out offset))
{
if (NativeMethods.TryStatFileAndUpdateIndex(this.tracer, gitPath, indexView, offset))
{
Interlocked.Increment(ref updatedEntries);
}
}
}
});
}
return updatedEntries > 0;
}
private bool UpdateFileInformationFromDiskForFiles(MemoryMappedViewAccessor indexView, BlockingCollection<string> addedOrEditedLocalFiles)
{
long updatedEntriesFromDisk = 0;
using (ITracer activity = this.tracer.StartActivity("UpdateDownloadedFiles", EventLevel.Informational, Keywords.Telemetry, null))
{
Parallel.ForEach(
addedOrEditedLocalFiles,
(localPath) =>
{
string gitPath = localPath.Replace(Path.DirectorySeparatorChar, GVFSConstants.GitPathSeparator);
long offset;
if (this.indexEntryOffsets.TryGetValue(gitPath, out offset))
{
if (NativeMethods.TryStatFileAndUpdateIndex(this.tracer, gitPath, indexView, offset))
{
Interlocked.Increment(ref updatedEntriesFromDisk);
}
else
{
this.tracer.RelatedError($"{nameof(this.UpdateFileInformationFromDiskForFiles)}: Failed to update file information from disk for file {0}", gitPath);
}
}
});
}
this.tracer.RelatedEvent(EventLevel.Informational, "UpdateIndexFileInformation", new EventMetadata() { { "UpdatedFromDisk", updatedEntriesFromDisk } }, Keywords.Telemetry);
return updatedEntriesFromDisk > 0;
}
private bool UpdateFileInformationForAllEntries(MemoryMappedViewAccessor indexView, Index otherIndex, bool shouldAlsoTryPopulateFromDisk)
{
long updatedEntriesFromOtherIndex = 0;
long updatedEntriesFromDisk = 0;
using (MemoryMappedFile mmf = otherIndex.GetMemoryMappedFile())
using (MemoryMappedViewAccessor otherIndexView = mmf.CreateViewAccessor())
{
Parallel.ForEach(
this.indexEntryOffsets,
entry =>
{
string currentIndexFilename = entry.Key;
long currentIndexOffset = entry.Value;
if (!IndexEntry.HasInitializedCTimeEntry(indexView, currentIndexOffset))
{
long otherIndexOffset;
if (otherIndex.indexEntryOffsets.TryGetValue(currentIndexFilename, out otherIndexOffset))
{
if (IndexEntry.HasInitializedCTimeEntry(otherIndexView, otherIndexOffset))
{
IndexEntry currentIndexEntry = new IndexEntry(indexView, currentIndexOffset);
IndexEntry otherIndexEntry = new IndexEntry(otherIndexView, otherIndexOffset);
currentIndexEntry.CtimeSeconds = otherIndexEntry.CtimeSeconds;
currentIndexEntry.CtimeNanosecondFraction = otherIndexEntry.CtimeNanosecondFraction;
currentIndexEntry.MtimeSeconds = otherIndexEntry.MtimeSeconds;
currentIndexEntry.MtimeNanosecondFraction = otherIndexEntry.MtimeNanosecondFraction;
currentIndexEntry.Dev = otherIndexEntry.Dev;
currentIndexEntry.Ino = otherIndexEntry.Ino;
currentIndexEntry.Uid = otherIndexEntry.Uid;
currentIndexEntry.Gid = otherIndexEntry.Gid;
currentIndexEntry.Size = otherIndexEntry.Size;
Interlocked.Increment(ref updatedEntriesFromOtherIndex);
}
}
else if (shouldAlsoTryPopulateFromDisk)
{
string localPath = FromGitRelativePathToDotnetFullPath(currentIndexFilename, this.repoRoot);
if (NativeMethods.TryStatFileAndUpdateIndex(this.tracer, localPath, indexView, entry.Value))
{
Interlocked.Increment(ref updatedEntriesFromDisk);
}
}
}
});
}
this.tracer.RelatedEvent(
EventLevel.Informational,
"UpdateIndexFileInformation",
new EventMetadata()
{
{ "UpdatedFromOtherIndex", updatedEntriesFromOtherIndex },
{ "UpdatedFromDisk", updatedEntriesFromDisk }
},
Keywords.Telemetry);
return (updatedEntriesFromOtherIndex > 0) || (updatedEntriesFromDisk > 0);
}
private void SignIndex()
{
using (ITracer activity = this.tracer.StartActivity("SignIndex", EventLevel.Informational, Keywords.Telemetry, metadata: null))
{
using (FileStream fs = File.Open(this.indexPath, FileMode.Open, FileAccess.ReadWrite))
{
// Truncate the old hash off. The Index class is expected to preserve any existing hash.
fs.SetLength(fs.Length - 20);
using (HashingStream hashStream = new HashingStream(fs))
{
fs.Position = 0;
hashStream.CopyTo(Stream.Null);
byte[] hash = hashStream.Hash;
// The fs pointer is now where the old hash used to be. Perfect. :)
fs.Write(hash, 0, hash.Length);
}
}
}
}
public void WriteFastFetchIndexVersionMarker()
{
if (File.Exists(this.versionMarkerFile))
{
File.SetAttributes(this.versionMarkerFile, FileAttributes.Normal);
}
Directory.CreateDirectory(Path.GetDirectoryName(this.versionMarkerFile));
File.WriteAllText(this.versionMarkerFile, CurrentFastFetchIndexVersion.ToString(), Encoding.ASCII);
File.SetAttributes(this.versionMarkerFile, FileAttributes.ReadOnly);
this.tracer.RelatedEvent(EventLevel.Informational, "MarkerWritten", new EventMetadata() { { "Version", CurrentFastFetchIndexVersion } });
}
private bool IsFastFetchVersionMarkerCurrent()
{
if (File.Exists(this.versionMarkerFile))
{
int version;
string marker = File.ReadAllText(this.versionMarkerFile, Encoding.ASCII);
bool isMarkerCurrent = int.TryParse(marker, out version) && (version == CurrentFastFetchIndexVersion);
this.tracer.RelatedEvent(EventLevel.Informational, "PreviousMarker", new EventMetadata() { { "Content", marker }, { "IsCurrent", isMarkerCurrent } }, Keywords.Telemetry);
return isMarkerCurrent;
}
this.tracer.RelatedEvent(EventLevel.Informational, "NoPreviousMarkerFound", null, Keywords.Telemetry);
return false;
}
private void ParseIndex(Stream indexStream)
{
byte[] buffer = new byte[40];
indexStream.Position = 0;
byte[] signature = new byte[4];
indexStream.Read(signature, 0, 4);
if (!Enumerable.SequenceEqual(MagicSignature, signature))
{
throw new InvalidDataException("Incorrect magic signature for index: " + string.Join(string.Empty, signature.Select(c => (char)c)));
}
this.IndexVersion = this.ReadUInt32(buffer, indexStream);
if (this.IndexVersion < 2 || this.IndexVersion > 4)
{
throw new InvalidDataException("Unsupported index version: " + this.IndexVersion);
}
this.entryCount = this.ReadUInt32(buffer, indexStream);
this.tracer.RelatedEvent(EventLevel.Informational, "IndexData", new EventMetadata() { { "Index", this.indexPath }, { "Version", this.IndexVersion }, { "entryCount", this.entryCount } }, Keywords.Telemetry);
this.indexEntryOffsets = new Dictionary<string, long>((int)this.entryCount, GVFSPlatform.Instance.Constants.PathComparer);
int previousPathLength = 0;
byte[] pathBuffer = new byte[MaxPathBufferSize];
for (int i = 0; i < this.entryCount; i++)
{
// See https://github.com/git/git/blob/867b1c1bf68363bcfd17667d6d4b9031fa6a1300/Documentation/technical/index-format.txt#L38
long entryOffset = indexStream.Position;
int entryLength = BaseEntryLength;
// Skip the next 60 bytes.
// 40 bytes encapsulated by IndexEntry but not needed now.
// 20 bytes of sha
indexStream.Position += 60;
ushort flags = this.ReadUInt16(buffer, indexStream);
bool isExtended = (flags & ExtendedBit) == ExtendedBit;
ushort pathLength = (ushort)(flags & 0xFFF);
entryLength += pathLength;
bool skipWorktree = false;
if (isExtended && (this.IndexVersion > 2))
{
ushort extendedFlags = this.ReadUInt16(buffer, indexStream);
skipWorktree = (extendedFlags & SkipWorktreeBit) == SkipWorktreeBit;
entryLength += 2;
}
if (this.IndexVersion == 4)
{
int replaceLength = this.ReadReplaceLength(indexStream);
int replaceIndex = previousPathLength - replaceLength;
indexStream.Read(pathBuffer, replaceIndex, pathLength - replaceIndex + 1);
previousPathLength = pathLength;
}
else
{
// Simple paths but 1 - 8 nul bytes as necessary to pad the entry to a multiple of eight bytes
int numNulBytes = 8 - (entryLength % 8);
indexStream.Read(pathBuffer, 0, pathLength + numNulBytes);
}
if (!skipWorktree)
{
// Examine only the things we're not skipping...
// Potential Future Perf Optimization: Perform this work on multiple threads. If we take the first byte and % by number of threads,
// we can ensure that all entries for a given folder end up in the same dictionary
string path = Encoding.UTF8.GetString(pathBuffer, 0, pathLength);
this.indexEntryOffsets[path] = entryOffset;
}
}
}
/// <summary>
/// Get the length of the replacement string. For definition of data, see:
/// https://github.com/git/git/blob/867b1c1bf68363bcfd17667d6d4b9031fa6a1300/Documentation/technical/index-format.txt#L38
/// </summary>
/// <param name="stream">stream to read bytes from</param>
/// <returns></returns>
private int ReadReplaceLength(Stream stream)
{
int headerByte = stream.ReadByte();
int offset = headerByte & 0x7f;
// Terminate the loop when the high bit is no longer set.
for (int i = 0; (headerByte & 0x80) != 0; i++)
{
headerByte = stream.ReadByte();
if (headerByte < 0)
{
throw new EndOfStreamException("Index file has been truncated.");
}
offset += 1;
offset = (offset << 7) + (headerByte & 0x7f);
}
return offset;
}
private uint ReadUInt32(byte[] buffer, Stream stream)
{
buffer[3] = (byte)stream.ReadByte();
buffer[2] = (byte)stream.ReadByte();
buffer[1] = (byte)stream.ReadByte();
buffer[0] = (byte)stream.ReadByte();
return BitConverter.ToUInt32(buffer, 0);
}
private ushort ReadUInt16(byte[] buffer, Stream stream)
{
buffer[1] = (byte)stream.ReadByte();
buffer[0] = (byte)stream.ReadByte();
// (ushort)BitConverter.ToInt16 avoids the running the duplicated checks in ToUInt16
return (ushort)BitConverter.ToInt16(buffer, 0);
}
/// <summary>
/// Private helper class to read/write specific values from a Git Index entry based on offset in a view.
/// </summary>
internal class IndexEntry
{
private const long UnixEpochMilliseconds = 116444736000000000;
private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
private MemoryMappedViewAccessor indexView;
public IndexEntry(MemoryMappedViewAccessor indexView, long offset)
{
this.indexView = indexView;
this.Offset = offset;
}
// EntryOffsets is the offset from the start of a index entry where specific data exists
// For more information about the layout of git index entries, see:
// https://github.com/git/git/blob/867b1c1bf68363bcfd17667d6d4b9031fa6a1300/Documentation/technical/index-format.txt#L38
private enum EntryOffsets
{
ctimeSeconds = 0,
ctimeNanoseconds = 4,
mtimeSeconds = 8,
mtimeNanoseconds = 12,
dev = 16,
ino = 20,
uid = 28,
gid = 32,
filesize = 36,
flags = 80,
extendedFlags = 82,
}
public long Offset { get; set; }
public uint CtimeSeconds
{
get
{
return this.ReadUInt32(EntryOffsets.ctimeSeconds);
}
set
{
this.WriteUInt32(EntryOffsets.ctimeSeconds, value);
}
}
public uint CtimeNanosecondFraction
{
get
{
return this.ReadUInt32(EntryOffsets.ctimeNanoseconds);
}
set
{
this.WriteUInt32(EntryOffsets.ctimeNanoseconds, value);
}
}
public DateTime Ctime
{
get
{
return this.ToDotnetTime(this.CtimeSeconds, this.CtimeNanosecondFraction);
}
set
{
IndexEntryTime time = this.ToGitTime(value);
this.CtimeSeconds = time.Seconds;
this.CtimeNanosecondFraction = time.NanosecondFraction;
}
}
public uint MtimeSeconds
{
get
{
return this.ReadUInt32(EntryOffsets.mtimeSeconds);
}
set
{
this.WriteUInt32(EntryOffsets.mtimeSeconds, value);
}
}
public uint MtimeNanosecondFraction
{
get
{
return this.ReadUInt32(EntryOffsets.mtimeNanoseconds);
}
set
{
this.WriteUInt32(EntryOffsets.mtimeNanoseconds, value);
}
}
public DateTime Mtime
{
get
{
return this.ToDotnetTime(this.MtimeSeconds, this.MtimeNanosecondFraction);
}
set
{
IndexEntryTime times = this.ToGitTime(value);
this.MtimeSeconds = times.Seconds;
this.MtimeNanosecondFraction = times.NanosecondFraction;
}
}
public uint Size
{
get
{
return this.ReadUInt32(EntryOffsets.filesize);
}
set
{
this.WriteUInt32(EntryOffsets.filesize, value);
}
}
public uint Dev
{
get
{
return this.ReadUInt32(EntryOffsets.dev);
}
set
{
this.WriteUInt32(EntryOffsets.dev, value);
}
}
public uint Ino
{
get
{
return this.ReadUInt32(EntryOffsets.ino);
}
set
{
this.WriteUInt32(EntryOffsets.ino, value);
}
}
public uint Uid
{
get
{
return this.ReadUInt32(EntryOffsets.uid);
}
set
{
this.WriteUInt32(EntryOffsets.uid, value);
}
}
public uint Gid
{
get
{
return this.ReadUInt32(EntryOffsets.gid);
}
set
{
this.WriteUInt32(EntryOffsets.gid, value);
}
}
public ushort Flags
{
get
{
return this.ReadUInt16(EntryOffsets.flags);
}
set
{
this.WriteUInt16(EntryOffsets.flags, value);
}
}
public bool IsExtended
{
get
{
return (this.Flags & Index.ExtendedBit) == Index.ExtendedBit;
}
}
public static bool HasInitializedCTimeEntry(MemoryMappedViewAccessor indexView, long offset)
{
return EndianHelper.Swap(indexView.ReadUInt32(offset + (long)EntryOffsets.ctimeSeconds)) != 0;
}
private uint ReadUInt32(EntryOffsets fromOffset)
{
return EndianHelper.Swap(this.indexView.ReadUInt32(this.Offset + (long)fromOffset));
}
private void WriteUInt32(EntryOffsets fromOffset, uint data)
{
this.indexView.Write(this.Offset + (long)fromOffset, EndianHelper.Swap(data));
}
private ushort ReadUInt16(EntryOffsets fromOffset)
{
return EndianHelper.Swap(this.indexView.ReadUInt16(this.Offset + (long)fromOffset));
}
private void WriteUInt16(EntryOffsets fromOffset, ushort data)
{
this.indexView.Write(this.Offset + (long)fromOffset, EndianHelper.Swap(data));
}
private IndexEntryTime ToGitTime(DateTime datetime)
{
if (datetime > UnixEpoch)
{
// Using the same FileTime -> Unix time conversion that Git uses.
long unixEpochRelativeNanoseconds = datetime.ToFileTime() - IndexEntry.UnixEpochMilliseconds;
uint wholeSeconds = (uint)(unixEpochRelativeNanoseconds / (long)10000000);
uint nanosecondFraction = (uint)((unixEpochRelativeNanoseconds % 10000000) * 100);
return new IndexEntryTime() { Seconds = wholeSeconds, NanosecondFraction = nanosecondFraction };
}
else
{
return new IndexEntryTime() { Seconds = 0, NanosecondFraction = 0 };
}
}
private DateTime ToDotnetTime(uint seconds, uint nanosecondFraction)
{
DateTime time = UnixEpoch.AddSeconds(seconds).AddMilliseconds(nanosecondFraction / 1000000);
return time;
}
private class IndexEntryTime
{
public uint Seconds { get; set; }
public uint NanosecondFraction { get; set; }
}
}
}
}
================================================
FILE: GVFS/FastFetch/IndexLock.cs
================================================
using GVFS.Common;
using GVFS.Common.Git;
using GVFS.Common.Prefetch;
using GVFS.Common.Tracing;
using System;
using System.IO;
namespace FastFetch
{
/// <summary>
/// A mechanism for holding the 'index.lock' on a repository for the time it takes to update the index
/// and working tree. It attempts to create the file in the constructor and throws if that fails.
/// It closes and deletes index.lock on dispose.
/// </summary>
/// <remarks>
/// <para>
/// This class should not have to exist. If FastFetch was in compliance with the git way of doing
/// business, then <see cref="CheckoutPrefetcher"/> would work like this:
/// </para>
/// <list type="bullet">
/// <item>
/// It would open index.lock like this does - with CreateNew, before it started messing with the working tree.
/// </item>
/// <item>
/// It would have just one class responsible for writing the new index into index.lock (now it has two,
/// <see cref="Index"/> and <see cref="GitIndexGenerator"/>). And this combined class would write in the
/// file size and timestamp information from the appropriate sources as it goes.
/// </item>
/// <item>
/// It would then reread index.lock (without closing it) and calculate the hash.
/// </item>
/// <item>
/// It would then delete the old index file, close index.lock, and move it to index.
/// </item>
/// </list>
/// <para>
/// This is all in contrast to how it works now, where it has separate operations for updating
/// the working tree, creating an index with no size/timestamp information, and then rewriting
/// it with that information.
/// </para>
/// <para>
/// This class is just a bodge job to make it so that we can leave the code pretty much as-is (and reduce
/// the risk of breaking things) and still get the protection we need against simultaneous git commands
/// being run.
/// </para>
/// </remarks>
public class IndexLock
: IDisposable
{
private string lockFilePath;
private FileStream lockFileStream;
public IndexLock(string repositoryRoot, ITracer tracer)
{
this.lockFilePath = Path.Combine(repositoryRoot, GVFSConstants.DotGit.IndexLock);
try
{
this.lockFileStream = File.Open(lockFilePath, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None);
}
catch (Exception ex)
{
tracer.RelatedError("Unable to create: {0}: {1}", lockFilePath, ex.Message);
throw new BlobPrefetcher.FetchException("Could not acquire index.lock.");
}
}
/// <inheritdoc/>>
public void Dispose()
{
if (this.lockFilePath == null)
{
return;
}
if (this.lockFileStream == null)
{
throw new ObjectDisposedException(nameof(IndexLock));
}
this.lockFileStream.Dispose();
this.lockFileStream = null;
File.Delete(this.lockFilePath);
this.lockFilePath = null;
}
}
}
================================================
FILE: GVFS/FastFetch/NativeMethods.cs
================================================
using GVFS.Common.Tracing;
using Microsoft.Win32.SafeHandles;
using System;
using System.ComponentModel;
using System.IO;
using System.IO.MemoryMappedFiles;
using System.Runtime.InteropServices;
namespace FastFetch
{
internal static class NativeMethods
{
private const int AccessDeniedWin32Error = 5;
public static unsafe void WriteFile(ITracer tracer, byte* originalData, long originalSize, string destination, ushort mode)
{
try
{
using (SafeFileHandle fileHandle = OpenForWrite(tracer, destination))
{
if (fileHandle.IsInvalid)
{
throw new Win32Exception(Marshal.GetLastWin32Error());
}
byte* data = originalData;
long size = originalSize;
uint written = 0;
while (size > 0)
{
uint toWrite = size < uint.MaxValue ? (uint)size : uint.MaxValue;
if (!WriteFile(fileHandle, data, toWrite, out written, IntPtr.Zero))
{
throw new Win32Exception(Marshal.GetLastWin32Error());
}
size -= written;
data = data + written;
}
}
}
catch (Exception e)
{
EventMetadata metadata = new EventMetadata();
metadata.Add("destination", destination);
metadata.Add("exception", e.ToString());
tracer.RelatedError(metadata, "Error writing file.");
throw;
}
}
public static bool TryStatFileAndUpdateIndex(ITracer tracer, string path, MemoryMappedViewAccessor indexView, long offset)
{
try
{
FileInfo file = new FileInfo(path);
if (file.Exists)
{
Index.IndexEntry indexEntry = new Index.IndexEntry(indexView, offset);
indexEntry.Mtime = file.LastWriteTimeUtc;
indexEntry.Ctime = file.CreationTimeUtc;
indexEntry.Size = (uint)file.Length;
return true;
}
}
catch (System.Security.SecurityException)
{
// Skip these.
}
catch (System.UnauthorizedAccessException)
{
// Skip these.
}
return false;
}
private static SafeFileHandle OpenForWrite(ITracer tracer, string fileName)
{
SafeFileHandle handle = CreateFile(fileName, FileAccess.Write, FileShare.None, IntPtr.Zero, FileMode.Create, FileAttributes.Normal, IntPtr.Zero);
if (handle.IsInvalid)
{
// If we get a access denied, try reverting the acls to defaults inherited by parent
if (Marshal.GetLastWin32Error() == AccessDeniedWin32Error)
{
tracer.RelatedEvent(
EventLevel.Warning,
"FailedOpenForWrite",
new EventMetadata
{
{ TracingConstants.MessageKey.WarningMessage, "Received access denied. Attempting to delete." },
{ "FileName", fileName }
});
File.SetAttributes(fileName, FileAttributes.Normal);
File.Delete(fileName);
handle = CreateFile(fileName, FileAccess.Write, FileShare.None, IntPtr.Zero, FileMode.Create, FileAttributes.Normal, IntPtr.Zero);
}
}
return handle;
}
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern SafeFileHandle CreateFile(
[MarshalAs(UnmanagedType.LPTStr)] string filename,
[MarshalAs(UnmanagedType.U4)] FileAccess access,
[MarshalAs(UnmanagedType.U4)] FileShare share,
IntPtr securityAttributes, // optional SECURITY_ATTRIBUTES struct or IntPtr.Zero
[MarshalAs(UnmanagedType.U4)] FileMode creationDisposition,
[MarshalAs(UnmanagedType.U4)] FileAttributes flagsAndAttributes,
IntPtr templateFile);
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
private static unsafe extern bool WriteFile(
SafeFileHandle file,
byte* buffer,
uint numberOfBytesToWrite,
out uint numberOfBytesWritten,
IntPtr overlapped);
}
}
================================================
FILE: GVFS/FastFetch/Program.cs
================================================
using CommandLine;
using GVFS.PlatformLoader;
namespace FastFetch
{
public class Program
{
public static void Main(string[] args)
{
GVFSPlatformLoader.Initialize();
Parser.Default.ParseArguments<FastFetchVerb>(args)
.WithParsed(fastFetch => fastFetch.Execute());
}
}
}
================================================
FILE: GVFS/FastFetch/WorkingTree.cs
================================================
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using GVFS.Common;
namespace FastFetch
{
public static class WorkingTree
{
/// <summary>
/// Enumerates all files in the working tree in a asynchronous parallel manner.
/// Files found are sent to callback in chunks.
/// Make no assumptions about ordering or how big chunks will be
/// </summary>
/// <param name="repoRoot"></param>
/// <param name="asyncParallelCallback"></param>
public static void ForAllFiles(string repoRoot, Action<string, FileInfo[]> asyncParallelCallback)
{
ForAllDirectories(new DirectoryInfo(repoRoot), asyncParallelCallback);
}
public static void ForAllDirectories(DirectoryInfo dir, Action<string, FileInfo[]> asyncParallelCallback)
{
asyncParallelCallback(dir.FullName, dir.GetFiles());
Parallel.ForEach(
dir.EnumerateDirectories().Where(subdir =>
(!subdir.Name.Equals(GVFSConstants.DotGit.Root, GVFSPlatform.Instance.Constants.PathComparison) &&
!subdir.Attributes.HasFlag(FileAttributes.ReparsePoint))),
subdir => { ForAllDirectories(subdir, asyncParallelCallback); });
}
}
}
================================================
FILE: GVFS/GVFS/CommandLine/CacheServerVerb.cs
================================================
using CommandLine;
using GVFS.Common;
using GVFS.Common.Http;
using GVFS.Common.Tracing;
using System;
using System.Collections.Generic;
using System.Linq;
namespace GVFS.CommandLine
{
[Verb(CacheVerbName, HelpText = "Manages the cache server configuration for an existing repo.")]
public class CacheServerVerb : GVFSVerb.ForExistingEnlistment
{
private const string CacheVerbName = "cache-server";
[Option(
"set",
Default = null,
Required = false,
HelpText = "Sets the cache server to the supplied name or url")]
public string CacheToSet { get; set; }
[Option("get", Required = false, HelpText = "Outputs the current cache server information. This is the default.")]
public bool OutputCurrentInfo { get; set; }
[Option(
"list",
Required = false,
HelpText = "List available cache servers for the remote repo")]
public bool ListCacheServers { get; set; }
protected override string VerbName
{
get { return CacheVerbName; }
}
protected override void Execute(GVFSEnlistment enlistment)
{
this.BlockEmptyCacheServerUrl(this.CacheToSet);
RetryConfig retryConfig = new RetryConfig(RetryConfig.DefaultMaxRetries, TimeSpan.FromMinutes(RetryConfig.FetchAndCloneTimeoutMinutes));
using (ITracer tracer = new JsonTracer(GVFSConstants.GVFSEtwProviderName, "CacheVerb"))
{
CacheServerResolver cacheServerResolver = new CacheServerResolver(tracer, enlistment);
ServerGVFSConfig serverGVFSConfig = null;
string error = null;
// Handle the three operation types: list, set, and get (default)
if (this.ListCacheServers)
{
// For listing, require config endpoint to succeed (no fallback)
if (!this.TryAuthenticateAndQueryGVFSConfig(
tracer, enlistment, retryConfig, out serverGVFSConfig, out error))
{
this.ReportErrorAndExit(tracer, "Unable to query /gvfs/config" + Environment.NewLine + error);
}
List<CacheServerInfo> cacheServers = serverGVFSConfig.CacheServers.ToList();
if (cacheServers != null && cacheServers.Any())
{
this.Output.WriteLine();
this.Output.WriteLine("Available cache servers for: " + enlistment.RepoUrl);
foreach (CacheServerInfo cacheServerInfo in cacheServers)
{
this.Output.WriteLine(cacheServerInfo);
}
}
else
{
this.Output.WriteLine("There are no available cache servers for: " + enlistment.RepoUrl);
}
}
else if (this.CacheToSet != null)
{
// Setting a new cache server
CacheServerInfo cacheServer = cacheServerResolver.ParseUrlOrFriendlyName(this.CacheToSet);
// For set operation, allow fallback if config endpoint fails but cache server URL is valid
if (!this.TryAuthenticateAndQueryGVFSConfig(
tracer, enlistment, retryConfig, out serverGVFSConfig, out error,
fallbackCacheServer: cacheServer))
{
this.ReportErrorAndExit(tracer, "Authentication failed: " + error);
}
cacheServer = this.ResolveCacheServer(tracer, cacheServer, cacheServerResolver, serverGVFSConfig);
if (!cacheServerResolver.TrySaveUrlToLocalConfig(cacheServer, out error))
{
this.ReportErrorAndExit("Failed to save cache to config: " + error);
}
this.Output.WriteLine("You must remount GVFS for this to take effect.");
}
else
{
// Default operation: get current cache server info
CacheServerInfo cacheServer = CacheServerResolver.GetCacheServerFromConfig(enlistment);
// For get operation, allow fallback if config endpoint fails but cache server URL is valid
if (!this.TryAuthenticateAndQueryGVFSConfig(
tracer, enlistment, retryConfig, out serverGVFSConfig, out error,
fallbackCacheServer: cacheServer))
{
this.ReportErrorAndExit(tracer, "Authentication failed: " + error);
}
CacheServerInfo resolvedCacheServer = cacheServerResolver.ResolveNameFromRemote(cacheServer.Url, serverGVFSConfig);
this.Output.WriteLine("Using cache server: " + resolvedCacheServer);
}
}
}
}
}
================================================
FILE: GVFS/GVFS/CommandLine/CacheVerb.cs
================================================
using CommandLine;
using GVFS.Common;
using GVFS.Common.FileSystem;
using GVFS.Common.Tracing;
using System;
using System.Globalization;
using System.IO;
namespace GVFS.CommandLine
{
[Verb(CacheVerb.CacheVerbName, HelpText = "Display information about the GVFS shared object cache")]
public class CacheVerb : GVFSVerb.ForExistingEnlistment
{
private const string CacheVerbName = "cache";
public CacheVerb()
{
}
protected override string VerbName
{
get { return CacheVerbName; }
}
protected override void Execute(GVFSEnlistment enlistment)
{
using (ITracer tracer = new JsonTracer(GVFSConstants.GVFSEtwProviderName, "CacheVerb"))
{
string localCacheRoot;
string gitObjectsRoot;
this.GetLocalCachePaths(tracer, enlistment, out localCacheRoot, out gitObjectsRoot);
if (string.IsNullOrWhiteSpace(gitObjectsRoot))
{
this.ReportErrorAndExit("Could not determine git objects root. Is this a GVFS enlistment with a shared cache?");
}
this.Output.WriteLine("Repo URL: " + enlistment.RepoUrl);
this.Output.WriteLine("Cache root: " + (localCacheRoot ?? "(unknown)"));
this.Output.WriteLine("Git objects: " + gitObjectsRoot);
string packRoot = Path.Combine(gitObjectsRoot, GVFSConstants.DotGit.Objects.Pack.Name);
if (!Directory.Exists(packRoot))
{
this.Output.WriteLine();
this.Output.WriteLine("Pack directory not found: " + packRoot);
tracer.RelatedError("Pack directory not found: " + packRoot);
return;
}
int prefetchPackCount;
long prefetchPackSize;
int otherPackCount;
long otherPackSize;
long latestPrefetchTimestamp;
this.GetPackSummary(packRoot, out prefetchPackCount, out prefetchPackSize, out otherPackCount, out otherPackSize, out latestPrefetchTimestamp);
int looseObjectCount = this.CountLooseObjects(gitObjectsRoot);
long totalSize = prefetchPackSize + otherPackSize;
this.Output.WriteLine();
this.Output.WriteLine("Total pack size: " + this.FormatSizeForUserDisplay(totalSize));
this.Output.WriteLine("Prefetch packs: " + prefetchPackCount + " (" + this.FormatSizeForUserDisplay(prefetchPackSize) + ")");
this.Output.WriteLine("Other packs: " + otherPackCount + " (" + this.FormatSizeForUserDisplay(otherPackSize) + ")");
if (latestPrefetchTimestamp > 0)
{
try
{
DateTimeOffset latestTime = DateTimeOffset.FromUnixTimeSeconds(latestPrefetchTimestamp).ToLocalTime();
this.Output.WriteLine("Latest prefetch: " + latestTime.ToString("yyyy-MM-dd HH:mm:ss zzz"));
}
catch (ArgumentOutOfRangeException)
{
tracer.RelatedWarning("Prefetch timestamp out of range: " + latestPrefetchTimestamp);
}
}
this.Output.WriteLine("Loose objects: " + looseObjectCount.ToString("N0"));
EventMetadata metadata = new EventMetadata();
metadata.Add("repoUrl", enlistment.RepoUrl);
metadata.Add("localCacheRoot", localCacheRoot);
metadata.Add("gitObjectsRoot", gitObjectsRoot);
metadata.Add("prefetchPackCount", prefetchPackCount);
metadata.Add("prefetchPackSize", prefetchPackSize);
metadata.Add("otherPackCount", otherPackCount);
metadata.Add("otherPackSize", otherPackSize);
metadata.Add("latestPrefetchTimestamp", latestPrefetchTimestamp);
metadata.Add("looseObjectCount", looseObjectCount);
tracer.RelatedEvent(EventLevel.Informational, "CacheInfo", metadata, Keywords.Telemetry);
}
}
internal void GetPackSummary(
string packRoot,
out int prefetchPackCount,
out long prefetchPackSize,
out int otherPackCount,
out long otherPackSize,
out long latestPrefetchTimestamp)
{
prefetchPackCount = 0;
prefetchPackSize = 0;
otherPackCount = 0;
otherPackSize = 0;
latestPrefetchTimestamp = 0;
string[] packFiles = Directory.GetFiles(packRoot, "*.pack");
foreach (string packFile in packFiles)
{
long length;
try
{
length = new FileInfo(packFile).Length;
}
catch (IOException)
{
continue;
}
string fileName = Path.GetFileName(packFile);
if (fileName.StartsWith(GVFSConstants.PrefetchPackPrefix, StringComparison.OrdinalIgnoreCase))
{
prefetchPackCount++;
prefetchPackSize += length;
long? timestamp = this.TryGetPrefetchTimestamp(packFile);
if (timestamp.HasValue && timestamp.Value > latestPrefetchTimestamp)
{
latestPrefetchTimestamp = timestamp.Value;
}
}
else
{
otherPackCount++;
otherPackSize += length;
}
}
}
internal int CountLooseObjects(string gitObjectsRoot)
{
int looseObjectCount = 0;
for (int i = 0; i < 256; i++)
{
string hexDir = Path.Combine(gitObjectsRoot, i.ToString("x2"));
if (Directory.Exists(hexDir))
{
try
{
looseObjectCount += Directory.GetFiles(hexDir).Length;
}
catch (IOException)
{
}
}
}
return looseObjectCount;
}
private long? TryGetPrefetchTimestamp(string packPath)
{
string filename = Path.GetFileName(packPath);
string[] parts = filename.Split('-');
if (parts.Length > 1 && long.TryParse(parts[1], out long timestamp))
{
return timestamp;
}
return null;
}
internal string FormatSizeForUserDisplay(long bytes)
{
if (bytes >= 1L << 30)
{
return string.Format(CultureInfo.CurrentCulture, "{0:F1} GB", bytes / (double)(1L << 30));
}
if (bytes >= 1L << 20)
{
return string.Format(CultureInfo.CurrentCulture, "{0:F1} MB", bytes / (double)(1L << 20));
}
if (bytes >= 1L << 10)
{
return string.Format(CultureInfo.CurrentCulture, "{0:F1} KB", bytes / (double)(1L << 10));
}
return bytes + " bytes";
}
private void GetLocalCachePaths(ITracer tracer, GVFSEnlistment enlistment, out string localCacheRoot, out string gitObjectsRoot)
{
localCacheRoot = null;
gitObjectsRoot = null;
try
{
string error;
if (RepoMetadata.TryInitialize(tracer, Path.Combine(enlistment.EnlistmentRoot, GVFSPlatform.Instance.Constants.DotGVFSRoot), out error))
{
if (!RepoMetadata.Instance.TryGetLocalCacheRoot(out localCacheRoot, out error))
{
tracer.RelatedWarning("Failed to read local cache root: " + error);
}
if (!RepoMetadata.Instance.TryGetGitObjectsRoot(out gitObjectsRoot, out error))
{
tracer.RelatedWarning("Failed to read git objects root: " + error);
}
}
else
{
this.ReportErrorAndExit("Failed to read repo metadata: " + error);
}
}
catch (Exception e)
{
this.ReportErrorAndExit("Failed to read repo metadata: " + e.Message);
}
finally
{
RepoMetadata.Shutdown();
}
}
}
}
================================================
FILE: GVFS/GVFS/CommandLine/CloneVerb.cs
================================================
using CommandLine;
using GVFS.Common;
using GVFS.Common.FileSystem;
using GVFS.Common.Git;
using GVFS.Common.Http;
using GVFS.Common.NamedPipes;
using GVFS.Common.Tracing;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
namespace GVFS.CommandLine
{
[Verb(CloneVerb.CloneVerbName, HelpText = "Clone a git repo and mount it as a GVFS virtual repo")]
public class CloneVerb : GVFSVerb
{
private const string CloneVerbName = "clone";
[Value(
0,
Required = true,
MetaName = "Repository URL",
HelpText = "The url of the repo")]
public string RepositoryURL { get; set; }
[Value(
1,
Required = false,
Default = "",
MetaName = "Enlistment Root Path",
HelpText = "Full or relative path to the GVFS enlistment root")]
public override string EnlistmentRootPathParameter { get; set; }
[Option(
"cache-server-url",
Required = false,
Default = null,
HelpText = "The url or friendly name of the cache server")]
public string CacheServerUrl { get; set; }
[Option(
'b',
"branch",
Required = false,
HelpText = "Branch to checkout after clone")]
public string Branch { get; set; }
[Option(
"single-branch",
Required = false,
Default = false,
HelpText = "Use this option to only download metadata for the branch that will be checked out")]
public bool SingleBranch { get; set; }
[Option(
"no-mount",
Required = false,
Default = false,
HelpText = "Use this option to only clone, but not mount the repo")]
public bool NoMount { get; set; }
[Option(
"no-prefetch",
Required = false,
Default = false,
HelpText = "Use this option to not prefetch commits after clone")]
public bool NoPrefetch { get; set; }
[Option(
"local-cache-path",
Required = false,
HelpText = "Use this option to override the path for the local GVFS cache.")]
public string LocalCacheRoot { get; set; }
protected override string VerbName
{
get { return CloneVerbName; }
}
public override void Execute()
{
int exitCode = 0;
this.ValidatePathParameter(this.EnlistmentRootPathParameter);
this.ValidatePathParameter(this.LocalCacheRoot);
string fullEnlistmentRootPathParameter;
string normalizedEnlistmentRootPath = this.GetCloneRoot(out fullEnlistmentRootPathParameter);
if (!string.IsNullOrWhiteSpace(this.LocalCacheRoot))
{
string fullLocalCacheRootPath = Path.GetFullPath(this.LocalCacheRoot);
string errorMessage;
string normalizedLocalCacheRootPath;
if (!GVFSPlatform.Instance.FileSystem.TryGetNormalizedPath(fullLocalCacheRootPath, out normalizedLocalCacheRootPath, out errorMessage))
{
this.ReportErrorAndExit($"Failed to determine normalized path for '--local-cache-path' path {fullLocalCacheRootPath}: {errorMessage}");
}
if (normalizedLocalCacheRootPath.StartsWith(
Path.Combine(normalizedEnlistmentRootPath, GVFSConstants.WorkingDirectoryRootName),
GVFSPlatform.Instance.Constants.PathComparison))
{
this.ReportErrorAndExit("'--local-cache-path' cannot be inside the src folder");
}
}
this.CheckKernelDriverSupported(normalizedEnlistmentRootPath);
this.CheckNotInsideExistingRepo(normalizedEnlistmentRootPath);
this.BlockEmptyCacheServerUrl(this.CacheServerUrl);
try
{
GVFSEnlistment enlistment;
Result cloneResult = new Result(false);
CacheServerInfo cacheServer = null;
ServerGVFSConfig serverGVFSConfig = null;
bool trustPackIndexes;
using (JsonTracer tracer = new JsonTracer(GVFSConstants.GVFSEtwProviderName, "GVFSClone"))
{
cloneResult = this.TryCreateEnlistment(fullEnlistmentRootPathParameter, normalizedEnlistmentRootPath, out enlistment);
if (cloneResult.Success)
{
// Create the enlistment root explicitly with CreateDirectoryAccessibleByAuthUsers before calling
// AddLogFileEventListener to ensure that elevated and non-elevated users have access to the root.
string createDirectoryError;
if (!GVFSPlatform.Instance.FileSystem.TryCreateDirectoryAccessibleByAuthUsers(enlistment.EnlistmentRoot, out createDirectoryError))
{
this.ReportErrorAndExit($"Failed to create '{enlistment.EnlistmentRoot}': {createDirectoryError}");
}
tracer.AddLogFileEventListener(
GVFSEnlistment.GetNewGVFSLogFileName(enlistment.GVFSLogsRoot, GVFSConstants.LogFileTypes.Clone),
EventLevel.Informational,
Keywords.Any);
tracer.WriteStartEvent(
enlistment.EnlistmentRoot,
enlistment.RepoUrl,
this.CacheServerUrl,
new EventMetadata
{
{ "Branch", this.Branch },
{ "LocalCacheRoot", this.LocalCacheRoot },
{ "SingleBranch", this.SingleBranch },
{ "NoMount", this.NoMount },
{ "NoPrefetch", this.NoPrefetch },
{ "Unattended", this.Unattended },
{ "IsElevated", GVFSPlatform.Instance.IsElevated() },
{ "NamedPipeName", enlistment.NamedPipeName },
{ "ProcessID", Process.GetCurrentProcess().Id },
{ nameof(this.EnlistmentRootPathParameter), this.EnlistmentRootPathParameter },
{ nameof(fullEnlistmentRootPathParameter), fullEnlistmentRootPathParameter },
});
CacheServerResolver cacheServerResolver = new CacheServerResolver(tracer, enlistment);
cacheServer = cacheServerResolver.ParseUrlOrFriendlyName(this.CacheServerUrl);
string resolvedLocalCacheRoot;
if (string.IsNullOrWhiteSpace(this.LocalCacheRoot))
{
string localCacheRootError;
if (!LocalCacheResolver.TryGetDefaultLocalCacheRoot(enlistment, out resolvedLocalCacheRoot, out localCacheRootError))
{
this.ReportErrorAndExit(
tracer,
$"Failed to determine the default location for the local GVFS cache: `{localCacheRootError}`");
}
}
else
{
resolvedLocalCacheRoot = Path.GetFullPath(this.LocalCacheRoot);
}
this.Output.WriteLine("Clone parameters:");
this.Output.WriteLine(" Repo URL: " + enlistment.RepoUrl);
this.Output.WriteLine(" Branch: " + (string.IsNullOrWhiteSpace(this.Branch) ? "Default" : this.Branch));
this.Output.WriteLine(" Cache Server: " + cacheServer);
this.Output.WriteLine(" Local Cache: " + resolvedLocalCacheRoot);
this.Output.WriteLine(" Destination: " + enlistment.EnlistmentRoot);
RetryConfig retryConfig = this.GetRetryConfig(tracer, enlistment, TimeSpan.FromMinutes(RetryConfig.FetchAndCloneTimeoutMinutes));
string authErrorMessage;
if (!this.TryAuthenticateAndQueryGVFSConfig(
tracer,
enlistment,
retryConfig,
out serverGVFSConfig,
out authErrorMessage,
fallbackCacheServer: cacheServer))
{
this.ReportErrorAndExit(tracer, "Cannot clone because authentication failed: " + authErrorMessage);
}
cacheServer = this.ResolveCacheServer(tracer, cacheServer, cacheServerResolver, serverGVFSConfig);
this.ValidateClientVersions(tracer, enlistment, serverGVFSConfig, showWarnings: true);
this.ShowStatusWhileRunning(
() =>
{
cloneResult = this.TryClone(tracer, enlistment, cacheServer, retryConfig, serverGVFSConfig, resolvedLocalCacheRoot);
return cloneResult.Success;
},
"Cloning",
normalizedEnlistmentRootPath);
}
if (!cloneResult.Success)
{
tracer.RelatedError(cloneResult.ErrorMessage);
}
using (var repo = new LibGit2RepoInvoker(tracer, enlistment.WorkingDirectoryBackingRoot))
{
trustPackIndexes = repo.GetConfigBoolOrDefault(GVFSConstants.GitConfig.TrustPackIndexes, GVFSConstants.GitConfig.TrustPackIndexesDefault);
}
}
if (cloneResult.Success)
{
if (!this.NoPrefetch)
{
/* If pack indexes are not trusted, the prefetch can take a long time.
* We will run the prefetch command in the background.
*/
if (trustPackIndexes)
{
ReturnCode result = this.Execute<PrefetchVerb>(
enlistment,
verb =>
{
verb.Commits = true;
verb.SkipVersionCheck = true;
verb.ResolvedCacheServer = cacheServer;
verb.ServerGVFSConfig = serverGVFSConfig;
});
if (result != ReturnCode.Success)
{
this.Output.WriteLine("\r\nError during prefetch @ {0}", fullEnlistmentRootPathParameter);
exitCode = (int)result;
}
}
else
{
try
{
string gvfsExecutable = Assembly.GetExecutingAssembly().Location;
Process.Start(new ProcessStartInfo(
fileName: gvfsExecutable,
arguments: "prefetch --commits")
{
UseShellExecute = true,
WindowStyle = ProcessWindowStyle.Minimized,
WorkingDirectory = enlistment.EnlistmentRoot
});
this.Output.WriteLine("\r\nPrefetch of commit graph has been started as a background process. Git operations involving history may be slower until prefetch has completed.\r\n");
}
catch (Win32Exception ex)
{
this.Output.WriteLine("\r\nError starting prefetch: " + ex.Message);
this.Output.WriteLine("Run 'gvfs prefetch --commits' from within your enlistment to prefetch the commit graph.");
}
}
}
if (this.NoMount)
{
this.Output.WriteLine("\r\nIn order to mount, first cd to within your enlistment, then call: ");
this.Output.WriteLine("gvfs mount");
}
else
{
this.Execute<MountVerb>(
enlistment,
verb =>
{
verb.SkipMountedCheck = true;
verb.SkipVersionCheck = true;
verb.ResolvedCacheServer = cacheServer;
verb.DownloadedGVFSConfig = serverGVFSConfig;
});
}
}
else
{
this.Output.WriteLine("\r\nCannot clone @ {0}", fullEnlistmentRootPathParameter);
this.Output.WriteLine("Error: {0}", cloneResult.ErrorMessage);
exitCode = (int)ReturnCode.GenericError;
}
}
catch (AggregateException e)
{
this.Output.WriteLine("Cannot clone @ {0}:", fullEnlistmentRootPathParameter);
foreach (Exception ex in e.Flatten().InnerExceptions)
{
this.Output.WriteLine("Exception: {0}", ex.ToString());
}
exitCode = (int)ReturnCode.GenericError;
}
catch (VerbAbortedException)
{
throw;
}
catch (Exception e)
{
this.ReportErrorAndExit("Cannot clone @ {0}: {1}", fullEnlistmentRootPathParameter, e.ToString());
}
Environment.Exit(exitCode);
}
private static bool IsForceCheckoutErrorCloneFailure(string checkoutError)
{
if (string.IsNullOrWhiteSpace(checkoutError) ||
checkoutError.Contains("Already on"))
{
return false;
}
return true;
}
private Result TryCreateEnlistment(
string fullEnlistmentRootPathParameter,
string normalizedEnlistementRootPath,
out GVFSEnlistment enlistment)
{
enlistment = null;
// Check that EnlistmentRootPath is empty before creating a tracer and LogFileEventListener as
// LogFileEventListener will create a file in EnlistmentRootPath
if (Directory.Exists(normalizedEnlistementRootPath) && Directory.EnumerateFileSystemEntries(normalizedEnlistementRootPath).Any())
{
if (fullEnlistmentRootPathParameter.Equals(normalizedEnlistementRootPath, GVFSPlatform.Instance.Constants.PathComparison))
{
return new Result($"Clone directory '{fullEnlistmentRootPathParameter}' exists and is not empty");
}
return new Result($"Clone directory '{fullEnlistmentRootPathParameter}' ['{normalizedEnlistementRootPath}'] exists and is not empty");
}
string gitBinPath = GVFSPlatform.Instance.GitInstallation.GetInstalledGitBinPath();
if (string.IsNullOrWhiteSpace(gitBinPath))
{
return new Result(GVFSConstants.GitIsNotInstalledError);
}
this.CheckGVFSHooksVersion(tracer: null, hooksVersion: out _);
try
{
enlistment = new GVFSEnlistment(
normalizedEnlistementRootPath,
this.RepositoryURL,
gitBinPath,
authentication: null);
}
catch (InvalidRepoException e)
{
return new Result($"Error when creating a new GVFS enlistment at '{normalizedEnlistementRootPath}'. {e.Message}");
}
return new Result(true);
}
private Result TryClone(
JsonTracer tracer,
GVFSEnlistment enlistment,
CacheServerInfo cacheServer,
RetryConfig retryConfig,
ServerGVFSConfig serverGVFSConfig,
string resolvedLocalCacheRoot)
{
Result pipeResult;
using (NamedPipeServer pipeServer = this.StartNamedPipe(tracer, enlistment, out pipeResult))
{
if (!pipeResult.Success)
{
return pipeResult;
}
using (GitObjectsHttpRequestor objectRequestor = new GitObjectsHttpRequestor(tracer, enlistment, cacheServer, retryConfig))
{
GitRefs refs = objectRequestor.QueryInfoRefs(this.SingleBranch ? this.Branch : null);
if (refs == null)
{
return new Result("Could not query info/refs from: " + Uri.EscapeUriString(enlistment.RepoUrl));
}
if (this.Branch == null)
{
this.Branch = refs.GetDefaultBranch();
EventMetadata metadata = new EventMetadata();
metadata.Add("Branch", this.Branch);
tracer.RelatedEvent(EventLevel.Informational, "CloneDefaultRemoteBranch", metadata);
}
else
{
if (!refs.HasBranch(this.Branch))
{
EventMetadata metadata = new EventMetadata();
metadata.Add("Branch", this.Branch);
tracer.RelatedEvent(EventLevel.Warning, "CloneBranchDoesNotExist", metadata);
string errorMessage = string.Format("Remote branch {0} not found in upstream origin", this.Branch);
return new Result(errorMessage);
}
}
if (!enlistment.TryCreateEnlistmentSubFolders())
{
string error = "Could not create enlistment directories";
tracer.RelatedError(error);
return new Result(error);
}
if (!GVFSPlatform.Instance.FileSystem.IsFileSystemSupported(enlistment.EnlistmentRoot, out string fsError))
{
string error = $"FileSystem unsupported: {fsError}";
tracer.RelatedError(error);
return new Result(error);
}
string localCacheError;
if (!this.TryDetermineLocalCacheAndInitializePaths(tracer, enlistment, serverGVFSConfig, cacheServer, resolvedLocalCacheRoot, out localCacheError))
{
tracer.RelatedError(localCacheError);
return new Result(localCacheError);
}
// There's no need to use CreateDirectoryAccessibleByAuthUsers as these directories will inherit
// the ACLs used to create LocalCacheRoot
Directory.CreateDirectory(enlistment.GitObjectsRoot);
Directory.CreateDirectory(enlistment.GitPackRoot);
Directory.CreateDirectory(enlistment.BlobSizesRoot);
return this.CreateClone(tracer, enlistment, objectRequestor, refs, this.Branch);
}
}
}
private NamedPipeServer StartNamedPipe(ITracer tracer, GVFSEnlistment enlistment, out Result errorResult)
{
try
{
errorResult = new Result(true);
return AllowAllLocksNamedPipeServer.Create(tracer, enlistment);
}
catch (PipeNameLengthException)
{
errorResult = new Result("Failed to clone. Path exceeds the maximum number of allowed characters");
return null;
}
}
private string GetCloneRoot(out string fullEnlistmentRootPathParameter)
{
fullEnlistmentRootPathParameter = null;
try
{
string repoName = this.RepositoryURL.Substring(this.RepositoryURL.LastIndexOf('/') + 1);
fullEnlistmentRootPathParameter =
string.IsNullOrWhiteSpace(this.EnlistmentRootPathParameter)
? Path.Combine(Environment.CurrentDirectory, repoName)
: this.EnlistmentRootPathParameter;
fullEnlistmentRootPathParameter = Path.GetFullPath(fullEnlistmentRootPathParameter);
string errorMessage;
string enlistmentRootPath;
if (!GVFSPlatform.Instance.FileSystem.TryGetNormalizedPath(fullEnlistmentRootPathParameter, out enlistmentRootPath, out errorMessage))
{
this.ReportErrorAndExit("Unable to determine normalized path of clone root: " + errorMessage);
return null;
}
return enlistmentRootPath;
}
catch (IOException e)
{
this.ReportErrorAndExit("Unable to determine clone root: " + e.ToString());
return null;
}
}
private void CheckKernelDriverSupported(string normalizedEnlistmentRootPath)
{
string warning;
string error;
if (!GVFSPlatform.Instance.KernelDriver.IsSupported(normalizedEnlistmentRootPath, out warning, out error))
{
this.ReportErrorAndExit($"Error: {error}");
}
else if (!string.IsNullOrEmpty(warning))
{
this.Output.WriteLine();
this.Output.WriteLine($"WARNING: {warning}");
}
}
private void CheckNotInsideExistingRepo(string normalizedEnlistmentRootPath)
{
string errorMessage;
string existingEnlistmentRoot;
if (GVFSPlatform.Instance.TryGetGVFSEnlistmentRoot(normalizedEnlistmentRootPath, out existingEnlistmentRoot, out errorMessage))
{
this.ReportErrorAndExit("Error: You can't clone inside an existing GVFS repo ({0})", existingEnlistmentRoot);
}
if (this.IsExistingPipeListening(normalizedEnlistmentRootPath))
{
this.ReportErrorAndExit($"Error: There is currently a GVFS.Mount process running for '{normalizedEnlistmentRootPath}'. This process must be stopped before cloning.");
}
}
private bool TryDetermineLocalCacheAndInitializePaths(
ITracer tracer,
GVFSEnlistment enlistment,
ServerGVFSConfig serverGVFSConfig,
CacheServerInfo currentCacheServer,
string localCacheRoot,
out string errorMessage)
{
errorMessage = null;
LocalCacheResolver localCacheResolver = new LocalCacheResolver(enlistment);
string error;
string localCacheKey;
if (!localCacheResolver.TryGetLocalCacheKeyFromLocalConfigOrRemoteCacheServers(
tracer,
serverGVFSConfig,
currentCacheServer,
localCacheRoot,
localCacheKey: out localCacheKey,
errorMessage: out error))
{
errorMessage = "Error determining local cache key: " + error;
return false;
}
EventMetadata metadata = new EventMetadata();
metadata.Add("localCacheRoot", localCacheRoot);
metadata.Add("localCacheKey", localCacheKey);
metadata.Add(TracingConstants.MessageKey.InfoMessage, "Initializing cache paths");
tracer.RelatedEvent(EventLevel.Informational, "CloneVerb_TryDetermineLocalCacheAndInitializePaths", metadata);
enlistment.InitializeCachePathsFromKey(localCacheRoot, localCacheKey);
return true;
}
private Result CreateClone(
ITracer tracer,
GVFSEnlistment enlistment,
GitObjectsHttpRequestor objectRequestor,
GitRefs refs,
string branch)
{
Result initRepoResult = this.TryInitRepo(tracer, refs, enlistment);
if (!initRepoResult.Success)
{
return initRepoResult;
}
PhysicalFileSystem fileSystem = new PhysicalFileSystem();
string errorMessage;
if (!this.TryCreateAlternatesFile(fileSystem, enlistment, out errorMessage))
{
return new Result("Error configuring alternate: " + errorMessage);
}
GitRepo gitRepo = new GitRepo(tracer, enlistment, fileSystem);
GVFSContext context = new GVFSContext(tracer, fileSystem, gitRepo, enlistment);
GVFSGitObjects gitObjects = new GVFSGitObjects(context, objectRequestor);
if (!this.TryDownloadCommit(
refs.GetTipCommitId(branch),
enlistment,
objectRequestor,
gitObjects,
gitRepo,
out errorMessage))
{
return new Result(errorMessage);
}
if (!GVFSVerb.TrySetRequiredGitConfigSettings(enlistment) ||
!GVFSVerb.TrySetOptionalGitConfigSettings(enlistment))
{
return new Result("Unable to configure git repo");
}
CacheServerResolver cacheServerResolver = new CacheServerResolver(tracer, enlistment);
if (!cacheServerResolver.TrySaveUrlToLocalConfig(objectRequestor.CacheServer, out errorMessage))
{
return new Result("Unable to configure cache server: " + errorMessage);
}
GitProcess git = new GitProcess(enlistment);
string originBranchName = "origin/" + branch;
GitProcess.Result createBranchResult = git.CreateBranchWithUpstream(branch, originBranchName);
if (createBranchResult.ExitCodeIsFailure)
{
return new Result("Unable to create branch '" + originBranchName + "': " + createBranchResult.Errors + "\r\n" + createBranchResult.Output);
}
File.WriteAllText(
Path.Combine(enlistment.WorkingDirectoryBackingRoot, GVFSConstants.DotGit.Head),
"ref: refs/heads/" + branch);
if (!this.TryDownloadRootGitAttributes(enlistment, gitObjects, gitRepo, out errorMessage))
{
return new Result(errorMessage);
}
this.CreateGitScript(enlistment);
string installHooksError;
if (!HooksInstaller.InstallHooks(context, out installHooksError))
{
tracer.RelatedError(installHooksError);
return new Result(installHooksError);
}
GitProcess.Result forceCheckoutResult = git.ForceCheckout(branch);
if (forceCheckoutResult.ExitCodeIsFailure && forceCheckoutResult.Errors.IndexOf("unable to read tree") > 0)
{
// It is possible to have the above TryDownloadCommit() fail because we
// already have the commit and root tree we intend to check out, but
// don't have a tree further down the working directory. If we fail
// checkout here, its' because we don't have these trees and the
// read-object hook is not available yet. Force downloading the commit
// again and retry the checkout.
if (!this.TryDownloadCommit(
refs.GetTipCommitId(branch),
enlistment,
objectRequestor,
gitObjects,
gitRepo,
out errorMessage,
checkLocalObjectCache: false))
{
return new Result(errorMessage);
}
forceCheckoutResult = git.ForceCheckout(branch);
}
if (forceCheckoutResult.ExitCodeIsFailure)
{
string[] errorLines = forceCheckoutResult.Errors.Split('\n');
StringBuilder checkoutErrors = new StringBuilder();
foreach (string gitError in errorLines)
{
if (IsForceCheckoutErrorCloneFailure(gitError))
{
checkoutErrors.AppendLine(gitError);
}
}
if (checkoutErrors.Length > 0)
{
string error = "Could not complete checkout of branch: " + branch + ", " + checkoutErrors.ToString();
tracer.RelatedError(error);
return new Result(error);
}
}
if (!RepoMetadata.TryInitialize(tracer, enlistment.DotGVFSRoot, out errorMessage))
{
tracer.RelatedError(errorMessage);
return new Result(errorMessage);
}
try
{
RepoMetadata.Instance.SaveCloneMetadata(tracer, enlistment);
this.LogEnlistmentInfoAndSetConfigValues(tracer, git, enlistment);
}
catch (Exception e)
{
tracer.RelatedError(e.ToString());
return new Result(e.Message);
}
finally
{
RepoMetadata.Shutdown();
}
// Prepare the working directory folder for GVFS last to ensure that gvfs mount will fail if gvfs clone has failed
Exception exception;
string prepFileSystemError;
if (!GVFSPlatform.Instance.KernelDriver.TryPrepareFolderForCallbacks(enlistment.WorkingDirectoryBackingRoot, out prepFileSystemError, out exception))
{
EventMetadata metadata = new EventMetadata();
metadata.Add(nameof(prepFileSystemError), prepFileSystemError);
if (exception != null)
{
metadata.Add("Exception", exception.ToString());
}
tracer.RelatedError(metadata, $"{nameof(this.CreateClone)}: TryPrepareFolderForCallbacks failed");
return new Result(prepFileSystemError);
}
return new Result(true);
}
// TODO(#1364): Don't call this method on POSIX platforms (or have it no-op on them)
private void CreateGitScript(GVFSEnlistment enlistment)
{
FileInfo gitCmd = new FileInfo(Path.Combine(enlistment.EnlistmentRoot, "git.cmd"));
using (FileStream fs = gitCmd.Create())
using (StreamWriter writer = new StreamWriter(fs))
{
writer.Write(
@"
@echo OFF
echo .
echo ^[105;30m
echo This repo was cloned using GVFS, and the git repo is in the 'src' directory
echo Switching you to the 'src' directory and rerunning your git command
echo [0m
@echo ON
cd src
git %*
");
}
gitCmd.Attributes = FileAttributes.Hidden;
}
private Result TryInitRepo(ITracer tracer, GitRefs refs, Enlistment enlistmentToInit)
{
string repoPath = enlistmentToInit.WorkingDirectoryBackingRoot;
GitProcess.Result initResult = GitProcess.Init(enlistmentToInit);
if (initResult.ExitCodeIsFailure)
{
string error = string.Format("Could not init repo at to {0}: {1}", repoPath, initResult.Errors);
tracer.RelatedError(error);
return new Result(error);
}
try
{
GVFSPlatform.Instance.FileSystem.EnsureDirectoryIsOwnedByCurrentUser(enlistmentToInit.DotGitRoot);
}
catch (IOException e)
{
string error = string.Format("Could not ensure .git directory is owned by current user: {0}", e.Message);
tracer.RelatedError(error);
return new Result(error);
}
GitProcess.Result remoteAddResult = new GitProcess(enlistmentToInit).RemoteAdd("origin", enlistmentToInit.RepoUrl);
if (remoteAddResult.ExitCodeIsFailure)
{
string error = string.Format("Could not add remote to {0}: {1}", repoPath, remoteAddResult.Errors);
tracer.RelatedError(error);
return new Result(error);
}
File.WriteAllText(
Path.Combine(repoPath, GVFSConstants.DotGit.PackedRefs),
refs.ToPackedRefs());
return new Result(true);
}
private class Result
{
public Result(bool success)
{
this.Success = success;
this.ErrorMessage = string.Empty;
}
public Result(string errorMessage)
{
this.Success = false;
this.ErrorMessage = errorMessage;
}
public bool Success { get; }
public string ErrorMessage { get; }
}
}
}
================================================
FILE: GVFS/GVFS/CommandLine/ConfigVerb.cs
================================================
using CommandLine;
using GVFS.Common;
using System;
using System.Collections.Generic;
namespace GVFS.CommandLine
{
[Verb(ConfigVerbName, HelpText = "Get and set GVFS options.")]
public class ConfigVerb : GVFSVerb.ForNoEnlistment
{
private const string ConfigVerbName = "config";
private LocalGVFSConfig localConfig;
[Option(
'l',
"list",
Required = false,
HelpText = "Show all settings")]
public bool List { get; set; }
[Option(
'd',
"delete",
Required = false,
HelpText = "Name of setting to delete")]
public string KeyToDelete { get; set; }
[Value(
0,
Required = false,
MetaName = "Setting name",
HelpText = "Name of setting that is to be set or read")]
public string Key { get; set; }
[Value(
1,
Required = false,
MetaName = "Setting value",
HelpText = "Value of setting to be set")]
public string Value { get; set; }
protected override string VerbName
{
get { return ConfigVerbName; }
}
public override void Execute()
{
if (!GVFSPlatform.Instance.UnderConstruction.SupportsGVFSConfig)
{
this.ReportErrorAndExit("`gvfs config` is not yet implemented on this operating system.");
}
this.localConfig = new LocalGVFSConfig();
string error = null;
if (this.IsMutuallyExclusiveOptionsSet(out error))
{
this.ReportErrorAndExit(error);
}
if (this.List)
{
Dictionary<string, string> allSettings;
if (!this.localConfig.TryGetAllConfig(out allSettings, out error))
{
this.ReportErrorAndExit(error);
}
const string ConfigOutputFormat = "{0}={1}";
foreach (KeyValuePair<string, string> setting in allSettings)
{
Console.WriteLine(ConfigOutputFormat, setting.Key, setting.Value);
}
}
else if (!string.IsNullOrEmpty(this.KeyToDelete))
{
if (!GVFSPlatform.Instance.IsElevated())
{
this.ReportErrorAndExit("`gvfs config` must be run from an elevated command prompt when deleting settings.");
}
if (!this.localConfig.TryRemoveConfig(this.KeyToDelete, out error))
{
this.ReportErrorAndExit(error);
}
}
else if (!string.IsNullOrEmpty(this.Key))
{
bool valueSpecified = !string.IsNullOrEmpty(this.Value);
if (valueSpecified)
{
if (!GVFSPlatform.Instance.IsElevated())
{
this.ReportErrorAndExit("`gvfs config` must be run from an elevated command prompt when configuring settings.");
}
if (!this.localConfig.TrySetConfig(this.Key, this.Value, out error))
{
this.ReportErrorAndExit(error);
}
}
else
{
string valueRead = null;
if (!this.localConfig.TryGetConfig(this.Key, out valueRead, out error) ||
string.IsNullOrEmpty(valueRead))
{
this.ReportErrorAndExit(error);
}
else
{
Console.WriteLine(valueRead);
}
}
}
else
{
this.ReportErrorAndExit("You must specify an option. Run `gvfs config --help` for details.");
}
}
private bool IsMutuallyExclusiveOptionsSet(out string consoleMessage)
{
bool deleteSpecified = !string.IsNullOrEmpty(this.KeyToDelete);
bool setOrReadSpecified = !string.IsNullOrEmpty(this.Key);
bool listSpecified = this.List;
if (deleteSpecified && listSpecified)
{
consoleMessage = "You cannot delete and list settings at the same time.";
return true;
}
if (setOrReadSpecified && listSpecified)
{
consoleMessage = "You cannot list all and view (or update) individual settings at the same time.";
return true;
}
if (setOrReadSpecified && deleteSpecified)
{
consoleMessage = "You cannot delete a setting and view (or update) individual settings at the same time.";
return true;
}
consoleMessage = null;
return false;
}
}
}
================================================
FILE: GVFS/GVFS/CommandLine/DehydrateVerb.cs
================================================
using CommandLine;
using GVFS.Common;
using GVFS.Common.Database;
using GVFS.Common.FileSystem;
using GVFS.Common.Git;
using GVFS.Common.Http;
using GVFS.Common.Maintenance;
using GVFS.Common.NamedPipes;
using GVFS.Common.Tracing;
using GVFS.DiskLayoutUpgrades;
using GVFS.Virtualization.Projection;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace GVFS.CommandLine
{
[Verb(DehydrateVerb.DehydrateVerbName, HelpText = "EXPERIMENTAL FEATURE - Fully dehydrate a GVFS repo")]
public class DehydrateVerb : GVFSVerb.ForExistingEnlistment
{
private const string DehydrateVerbName = "dehydrate";
private const string FolderListSeparator = ";";
private PhysicalFileSystem fileSystem = new PhysicalFileSystem();
[Option(
"confirm",
Default = false,
Required = false,
HelpText = "Pass in this flag to actually do the dehydrate")]
public bool Confirmed { get; set; }
[Option(
"no-status",
Default = false,
Required = false,
HelpText = "Do not require a clean git status when dehydrating. To prevent data loss, this option cannot be combined with --folders option.")]
public bool NoStatus { get; set; }
[Option(
"folders",
Default = "",
Required = false,
HelpText = "A semicolon (" + FolderListSeparator + ") delimited list of folders to dehydrate. "
+ "Each folder must be relative to the repository root. "
+ "When omitted (without --full), all root-level folders are dehydrated.")]
public string Folders { get; set; }
[Option(
"full",
Default = false,
Required = false,
HelpText = "Perform a full dehydration that unmounts, backs up the entire src folder, and re-creates the virtualization root from scratch. "
+ "Without this flag, the default behavior dehydrates individual folders which is faster and does not require a full unmount.")]
public bool Full { get; set; }
public string RunningVerbName { get; set; } = DehydrateVerbName;
public string ActionName { get; set; } = DehydrateVerbName;
/// <summary>
/// True if another verb (e.g. 'gvfs sparse') has already validated that status is clean
/// </summary>
public bool StatusChecked { get; set; }
protected override string VerbName
{
get { return DehydrateVerb.DehydrateVerbName; }
}
protected override void Execute(GVFSEnlistment enlistment)
{
using (JsonTracer tracer = new JsonTracer(GVFSConstants.GVFSEtwProviderName, "Dehydrate"))
{
tracer.AddLogFileEventListener(
GVFSEnlistment.GetNewGVFSLogFileName(enlistment.GVFSLogsRoot, GVFSConstants.LogFileTypes.Dehydrate),
EventLevel.Informational,
Keywords.Any);
tracer.WriteStartEvent(
enlistment.EnlistmentRoot,
enlistment.RepoUrl,
CacheServerResolver.GetUrlFromConfig(enlistment),
new EventMetadata
{
{ "Confirmed", this.Confirmed },
{ "NoStatus", this.NoStatus },
{ "Full", this.Full },
{ "NamedPipeName", enlistment.NamedPipeName },
{ "Folders", this.Folders },
{ nameof(this.EnlistmentRootPathParameter), this.EnlistmentRootPathParameter },
});
// This is only intended to be run by functional tests
if (this.MaintenanceJob != null)
{
gitextract_91dbp7i6/
├── .azure-pipelines/
│ └── release.yml
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ ├── build.yaml
│ ├── functional-tests.yaml
│ ├── release-winget.yaml
│ └── scripts/
│ └── validate_release.ps1
├── .gitignore
├── .vsconfig
├── AuthoringTests.md
├── CONTRIBUTING.md
├── Directory.Build.props
├── Directory.Build.targets
├── Directory.Packages.props
├── Directory.Solution.props
├── GVFS/
│ ├── FastFetch/
│ │ ├── CheckoutPrefetcher.cs
│ │ ├── CheckoutStage.cs
│ │ ├── FastFetch.csproj
│ │ ├── FastFetchLibGit2Repo.cs
│ │ ├── FastFetchVerb.cs
│ │ ├── GitEnlistment.cs
│ │ ├── Index.cs
│ │ ├── IndexLock.cs
│ │ ├── NativeMethods.cs
│ │ ├── Program.cs
│ │ └── WorkingTree.cs
│ ├── GVFS/
│ │ ├── CommandLine/
│ │ │ ├── CacheServerVerb.cs
│ │ │ ├── CacheVerb.cs
│ │ │ ├── CloneVerb.cs
│ │ │ ├── ConfigVerb.cs
│ │ │ ├── DehydrateVerb.cs
│ │ │ ├── DiagnoseVerb.cs
│ │ │ ├── GVFSVerb.cs
│ │ │ ├── HealthVerb.cs
│ │ │ ├── LogVerb.cs
│ │ │ ├── MountVerb.cs
│ │ │ ├── PrefetchVerb.cs
│ │ │ ├── RepairVerb.cs
│ │ │ ├── ServiceVerb.cs
│ │ │ ├── SparseVerb.cs
│ │ │ ├── StatusVerb.cs
│ │ │ ├── UnmountVerb.cs
│ │ │ └── UpgradeVerb.cs
│ │ ├── GVFS.csproj
│ │ ├── InternalsVisibleTo.cs
│ │ ├── Program.cs
│ │ └── RepairJobs/
│ │ ├── BackgroundOperationDatabaseRepairJob.cs
│ │ ├── BlobSizeDatabaseRepairJob.cs
│ │ ├── GitConfigRepairJob.cs
│ │ ├── GitHeadRepairJob.cs
│ │ ├── GitIndexRepairJob.cs
│ │ ├── RepairJob.cs
│ │ ├── RepoMetadataDatabaseRepairJob.cs
│ │ └── VFSForGitDatabaseRepairJob.cs
│ ├── GVFS.Common/
│ │ ├── AzDevOpsOrgFromNuGetFeed.cs
│ │ ├── ConcurrentHashSet.cs
│ │ ├── ConsoleHelper.cs
│ │ ├── Database/
│ │ │ ├── GVFSDatabase.cs
│ │ │ ├── GVFSDatabaseException.cs
│ │ │ ├── IDbCommandExtensions.cs
│ │ │ ├── IDbConnectionFactory.cs
│ │ │ ├── IGVFSConnectionPool.cs
│ │ │ ├── IPlaceholderCollection.cs
│ │ │ ├── IPlaceholderData.cs
│ │ │ ├── ISparseCollection.cs
│ │ │ ├── PlaceholderTable.cs
│ │ │ ├── SparseTable.cs
│ │ │ └── SqliteDatabase.cs
│ │ ├── DiskLayoutUpgrades/
│ │ │ ├── DiskLayoutUpgrade.cs
│ │ │ ├── DiskLayoutUpgrade_SqlitePlaceholders.cs
│ │ │ └── DiskLayoutVersion.cs
│ │ ├── Enlistment.cs
│ │ ├── EpochConverter.cs
│ │ ├── FileBasedCollection.cs
│ │ ├── FileBasedCollectionException.cs
│ │ ├── FileBasedDictionary.cs
│ │ ├── FileBasedLock.cs
│ │ ├── FileSystem/
│ │ │ ├── DirectoryItemInfo.cs
│ │ │ ├── FileProperties.cs
│ │ │ ├── FlushToDiskFileStream.cs
│ │ │ ├── HooksInstaller.cs
│ │ │ ├── IKernelDriver.cs
│ │ │ ├── IPlatformFileSystem.cs
│ │ │ └── PhysicalFileSystem.cs
│ │ ├── GVFS.Common.csproj
│ │ ├── GVFSConstants.cs
│ │ ├── GVFSContext.cs
│ │ ├── GVFSEnlistment.Shared.cs
│ │ ├── GVFSEnlistment.cs
│ │ ├── GVFSLock.Shared.cs
│ │ ├── GVFSLock.cs
│ │ ├── GVFSPlatform.cs
│ │ ├── Git/
│ │ │ ├── DiffTreeResult.cs
│ │ │ ├── EndianHelper.cs
│ │ │ ├── GVFSGitObjects.cs
│ │ │ ├── GitAuthentication.cs
│ │ │ ├── GitConfigHelper.cs
│ │ │ ├── GitConfigSetting.cs
│ │ │ ├── GitCoreGVFSFlags.cs
│ │ │ ├── GitIndexGenerator.cs
│ │ │ ├── GitObjectContentType.cs
│ │ │ ├── GitObjects.cs
│ │ │ ├── GitOid.cs
│ │ │ ├── GitPathConverter.cs
│ │ │ ├── GitProcess.cs
│ │ │ ├── GitRefs.cs
│ │ │ ├── GitRepo.cs
│ │ │ ├── GitSsl.cs
│ │ │ ├── GitVersion.cs
│ │ │ ├── HashingStream.cs
│ │ │ ├── ICredentialStore.cs
│ │ │ ├── IGitInstallation.cs
│ │ │ ├── LibGit2Exception.cs
│ │ │ ├── LibGit2Repo.cs
│ │ │ ├── LibGit2RepoInvoker.cs
│ │ │ ├── NoOpStream.cs
│ │ │ ├── RefLogEntry.cs
│ │ │ ├── RequiredGitConfig.cs
│ │ │ ├── Sha1Id.cs
│ │ │ └── SideChannelStream.cs
│ │ ├── GitCommandLineParser.cs
│ │ ├── GitStatusCache.cs
│ │ ├── GitStatusCacheConfig.cs
│ │ ├── HealthCalculator/
│ │ │ ├── EnlistmentHealthCalculator.cs
│ │ │ ├── EnlistmentHealthData.cs
│ │ │ ├── EnlistmentHydrationSummary.cs
│ │ │ ├── EnlistmentPathData.cs
│ │ │ └── HydrationStatusCircuitBreaker.cs
│ │ ├── HeartbeatThread.cs
│ │ ├── Http/
│ │ │ ├── CacheServerInfo.cs
│ │ │ ├── CacheServerResolver.cs
│ │ │ ├── ConfigHttpRequestor.cs
│ │ │ ├── GitEndPointResponseData.cs
│ │ │ ├── GitObjectsHttpException.cs
│ │ │ ├── GitObjectsHttpRequestor.cs
│ │ │ └── HttpRequestor.cs
│ │ ├── IDiskLayoutUpgradeData.cs
│ │ ├── IHeartBeatMetadataProvider.cs
│ │ ├── IProcessRunner.cs
│ │ ├── InternalVerbParameters.cs
│ │ ├── InternalsVisibleTo.cs
│ │ ├── InvalidRepoException.cs
│ │ ├── LegacyPlaceholderListDatabase.cs
│ │ ├── LocalCacheResolver.cs
│ │ ├── LocalGVFSConfig.cs
│ │ ├── Maintenance/
│ │ │ ├── GitMaintenanceQueue.cs
│ │ │ ├── GitMaintenanceScheduler.cs
│ │ │ ├── GitMaintenanceStep.cs
│ │ │ ├── GitProcessChecker.cs
│ │ │ ├── LooseObjectsStep.cs
│ │ │ ├── PackfileMaintenanceStep.cs
│ │ │ ├── PostFetchStep.cs
│ │ │ └── PrefetchStep.cs
│ │ ├── MissingTreeTracker.cs
│ │ ├── ModifiedPathsDatabase.cs
│ │ ├── NamedPipes/
│ │ │ ├── AllowAllLocksNamedPipeServer.cs
│ │ │ ├── BrokenPipeException.cs
│ │ │ ├── HydrationStatusNamedPipeMessages.cs
│ │ │ ├── LockNamedPipeMessages.cs
│ │ │ ├── NamedPipeClient.cs
│ │ │ ├── NamedPipeMessages.cs
│ │ │ ├── NamedPipeServer.cs
│ │ │ ├── NamedPipeStreamReader.cs
│ │ │ ├── NamedPipeStreamWriter.cs
│ │ │ ├── PipeNameLengthException.cs
│ │ │ └── UnstageNamedPipeMessages.cs
│ │ ├── NativeMethods.Shared.cs
│ │ ├── NativeMethods.cs
│ │ ├── NetworkStreams/
│ │ │ ├── BatchedLooseObjectDeserializer.cs
│ │ │ ├── PrefetchPacksDeserializer.cs
│ │ │ └── RestrictedStream.cs
│ │ ├── OrgInfoApiClient.cs
│ │ ├── Paths.Shared.cs
│ │ ├── Prefetch/
│ │ │ ├── BlobPrefetcher.cs
│ │ │ ├── Git/
│ │ │ │ ├── DiffHelper.cs
│ │ │ │ ├── PathWithMode.cs
│ │ │ │ └── PrefetchGitObjects.cs
│ │ │ └── Pipeline/
│ │ │ ├── BatchObjectDownloadStage.cs
│ │ │ ├── Data/
│ │ │ │ ├── BlobDownloadRequest.cs
│ │ │ │ ├── IndexPackRequest.cs
│ │ │ │ └── TreeSearchRequest.cs
│ │ │ ├── FindBlobsStage.cs
│ │ │ ├── HydrateFilesStage.cs
│ │ │ ├── IndexPackStage.cs
│ │ │ └── PrefetchPipelineStage.cs
│ │ ├── ProcessHelper.cs
│ │ ├── ProcessResult.cs
│ │ ├── ProcessRunnerImpl.cs
│ │ ├── RepoMetadata.cs
│ │ ├── RetryBackoff.cs
│ │ ├── RetryCircuitBreaker.cs
│ │ ├── RetryConfig.cs
│ │ ├── RetryWrapper.cs
│ │ ├── RetryableException.cs
│ │ ├── ReturnCode.cs
│ │ ├── SHA1Util.cs
│ │ ├── ServerGVFSConfig.cs
│ │ ├── StreamUtil.cs
│ │ ├── Tracing/
│ │ │ ├── DiagnosticConsoleEventListener.cs
│ │ │ ├── EventLevel.cs
│ │ │ ├── EventListener.cs
│ │ │ ├── EventMetadata.cs
│ │ │ ├── EventOpcode.cs
│ │ │ ├── IEventListenerEventSink.cs
│ │ │ ├── IQueuedPipeStringWriterEventSink.cs
│ │ │ ├── ITracer.cs
│ │ │ ├── JsonTracer.cs
│ │ │ ├── Keywords.cs
│ │ │ ├── LogFileEventListener.cs
│ │ │ ├── NullTracer.cs
│ │ │ ├── PrettyConsoleEventListener.cs
│ │ │ ├── QueuedPipeStringWriter.cs
│ │ │ ├── TelemetryDaemonEventListener.cs
│ │ │ ├── TraceEventMessage.cs
│ │ │ └── TracingConstants.cs
│ │ ├── VersionResponse.cs
│ │ ├── WorktreeCommandParser.cs
│ │ └── X509Certificates/
│ │ ├── CertificateVerifier.cs
│ │ └── SystemCertificateStore.cs
│ ├── GVFS.FunctionalTests/
│ │ ├── AssemblyAttributes.cs
│ │ ├── Categories.cs
│ │ ├── FileSystemRunners/
│ │ │ ├── BashRunner.cs
│ │ │ ├── CmdRunner.cs
│ │ │ ├── FileSystemRunner.cs
│ │ │ ├── PowerShellRunner.cs
│ │ │ ├── ShellRunner.cs
│ │ │ └── SystemIORunner.cs
│ │ ├── GVFS.FunctionalTests.csproj
│ │ ├── GVFSTestConfig.cs
│ │ ├── GlobalSetup.cs
│ │ ├── Program.cs
│ │ ├── Settings.cs
│ │ ├── Should/
│ │ │ └── FileSystemShouldExtensions.cs
│ │ ├── Tests/
│ │ │ ├── DiskLayoutVersionTests.cs
│ │ │ ├── EnlistmentPerFixture/
│ │ │ │ ├── BasicFileSystemTests.cs
│ │ │ │ ├── CacheServerTests.cs
│ │ │ │ ├── CloneTests.cs
│ │ │ │ ├── DehydrateTests.cs
│ │ │ │ ├── DiagnoseTests.cs
│ │ │ │ ├── GVFSLockTests.cs
│ │ │ │ ├── GVFSUpgradeReminderTests.cs
│ │ │ │ ├── GitBlockCommandsTests.cs
│ │ │ │ ├── GitCorruptObjectTests.cs
│ │ │ │ ├── GitFilesTests.cs
│ │ │ │ ├── GitMoveRenameTests.cs
│ │ │ │ ├── GitReadAndGitLockTests.cs
│ │ │ │ ├── HealthTests.cs
│ │ │ │ ├── MountTests.cs
│ │ │ │ ├── MoveRenameFileTests.cs
│ │ │ │ ├── MoveRenameFileTests_2.cs
│ │ │ │ ├── MoveRenameFolderTests.cs
│ │ │ │ ├── MultithreadedReadWriteTests.cs
│ │ │ │ ├── ParallelHydrationTests.cs
│ │ │ │ ├── PrefetchVerbTests.cs
│ │ │ │ ├── PrefetchVerbWithoutSharedCacheTests.cs
│ │ │ │ ├── SparseTests.cs
│ │ │ │ ├── StatusVerbTests.cs
│ │ │ │ ├── SymbolicLinkTests.cs
│ │ │ │ ├── TestsWithEnlistmentPerFixture.cs
│ │ │ │ ├── UnmountTests.cs
│ │ │ │ ├── UpdatePlaceholderTests.cs
│ │ │ │ ├── WorkingDirectoryTests.cs
│ │ │ │ └── WorktreeTests.cs
│ │ │ ├── EnlistmentPerTestCase/
│ │ │ │ ├── DiskLayoutUpgradeTests.cs
│ │ │ │ ├── LooseObjectStepTests.cs
│ │ │ │ ├── ModifiedPathsTests.cs
│ │ │ │ ├── PersistedWorkingDirectoryTests.cs
│ │ │ │ ├── RepairTests.cs
│ │ │ │ └── TestsWithEnlistmentPerTestCase.cs
│ │ │ ├── FastFetchTests.cs
│ │ │ ├── GVFSVerbTests.cs
│ │ │ ├── GitCommands/
│ │ │ │ ├── AddStageTests.cs
│ │ │ │ ├── CheckoutTests.cs
│ │ │ │ ├── CherryPickConflictTests.cs
│ │ │ │ ├── CorruptionReproTests.cs
│ │ │ │ ├── CreatePlaceholderTests.cs
│ │ │ │ ├── DeleteEmptyFolderTests.cs
│ │ │ │ ├── EnumerationMergeTest.cs
│ │ │ │ ├── GitCommandsTests.cs
│ │ │ │ ├── GitRepoTests.cs
│ │ │ │ ├── HashObjectTests.cs
│ │ │ │ ├── MergeConflictTests.cs
│ │ │ │ ├── RebaseConflictTests.cs
│ │ │ │ ├── RebaseTests.cs
│ │ │ │ ├── ResetHardTests.cs
│ │ │ │ ├── ResetMixedTests.cs
│ │ │ │ ├── ResetSoftTests.cs
│ │ │ │ ├── RmTests.cs
│ │ │ │ ├── StatusTests.cs
│ │ │ │ ├── UpdateIndexTests.cs
│ │ │ │ └── UpdateRefTests.cs
│ │ │ ├── MultiEnlistmentTests/
│ │ │ │ ├── ConfigVerbTests.cs
│ │ │ │ ├── ServiceVerbTests.cs
│ │ │ │ ├── SharedCacheTests.cs
│ │ │ │ └── TestsWithMultiEnlistment.cs
│ │ │ ├── PrintTestCaseStats.cs
│ │ │ └── TestResultsHelper.cs
│ │ ├── Tools/
│ │ │ ├── ControlGitRepo.cs
│ │ │ ├── FileSystemHelpers.cs
│ │ │ ├── GVFSFunctionalTestEnlistment.cs
│ │ │ ├── GVFSHelpers.cs
│ │ │ ├── GVFSProcess.cs
│ │ │ ├── GVFSServiceProcess.cs
│ │ │ ├── GitHelpers.cs
│ │ │ ├── GitProcess.cs
│ │ │ ├── NativeMethods.cs
│ │ │ ├── ProcessHelper.cs
│ │ │ ├── ProcessResult.cs
│ │ │ ├── ProjFSFilterInstaller.cs
│ │ │ ├── RepositoryHelpers.cs
│ │ │ └── TestConstants.cs
│ │ └── Windows/
│ │ ├── TestData/
│ │ │ └── BackgroundGitUpdates/
│ │ │ ├── PersistentDictionary.edb
│ │ │ ├── PersistentDictionary.jfm
│ │ │ ├── epc.chk
│ │ │ ├── epcres00001.jrs
│ │ │ └── epcres00002.jrs
│ │ ├── Tests/
│ │ │ ├── JunctionAndSubstTests.cs
│ │ │ ├── ServiceTests.cs
│ │ │ ├── SharedCacheUpgradeTests.cs
│ │ │ ├── WindowsDiskLayoutUpgradeTests.cs
│ │ │ ├── WindowsFileSystemTests.cs
│ │ │ ├── WindowsFolderUsnUpdate.cs
│ │ │ ├── WindowsTombstoneTests.cs
│ │ │ └── WindowsUpdatePlaceholderTests.cs
│ │ └── Tools/
│ │ └── RegistryHelper.cs
│ ├── GVFS.FunctionalTests.LockHolder/
│ │ ├── AcquireGVFSLock.cs
│ │ ├── GVFS.FunctionalTests.LockHolder.csproj
│ │ └── Program.cs
│ ├── GVFS.Hooks/
│ │ ├── GVFS.Hooks.csproj
│ │ ├── HooksPlatform/
│ │ │ └── GVFSHooksPlatform.cs
│ │ ├── KnownGitCommands.cs
│ │ ├── Program.Unstage.cs
│ │ ├── Program.Worktree.cs
│ │ ├── Program.cs
│ │ └── UnstageCommandParser.cs
│ ├── GVFS.Installers/
│ │ ├── GVFS.Installers.csproj
│ │ ├── Setup.iss
│ │ ├── info.bat
│ │ └── install.bat
│ ├── GVFS.MSBuild/
│ │ ├── CompileTemplatedFile.cs
│ │ ├── GVFS.MSBuild.csproj
│ │ ├── GVFS.targets
│ │ ├── GVFS.tasks
│ │ ├── GenerateGVFSConstants.cs
│ │ ├── GenerateGVFSVersionHeader.cs
│ │ └── GenerateWindowsAppManifest.cs
│ ├── GVFS.Mount/
│ │ ├── GVFS.Mount.csproj
│ │ ├── InProcessMount.cs
│ │ ├── InProcessMountVerb.cs
│ │ ├── MountAbortedException.cs
│ │ └── Program.cs
│ ├── GVFS.NativeHooks.Common/
│ │ ├── common.h
│ │ └── common.windows.cpp
│ ├── GVFS.NativeTests/
│ │ ├── FileUtils.cpp
│ │ ├── FileUtils.h
│ │ ├── GVFS.NativeTests.vcxproj
│ │ ├── GVFS.NativeTests.vcxproj.filters
│ │ ├── ReadMe.txt
│ │ ├── include/
│ │ │ ├── NtFunctions.h
│ │ │ ├── SafeHandle.h
│ │ │ ├── SafeOverlapped.h
│ │ │ ├── Should.h
│ │ │ ├── TestException.h
│ │ │ ├── TestHelpers.h
│ │ │ ├── TestVerifiers.h
│ │ │ ├── prjlib_internal.h
│ │ │ ├── prjlibp.h
│ │ │ ├── stdafx.h
│ │ │ └── targetver.h
│ │ ├── interface/
│ │ │ ├── NtQueryDirectoryFileTests.h
│ │ │ ├── PlaceholderUtils.h
│ │ │ ├── ProjFS_BugRegressionTest.h
│ │ │ ├── ProjFS_DeleteFileTest.h
│ │ │ ├── ProjFS_DeleteFolderTest.h
│ │ │ ├── ProjFS_DirEnumTest.h
│ │ │ ├── ProjFS_FileAttributeTest.h
│ │ │ ├── ProjFS_FileEATest.h
│ │ │ ├── ProjFS_FileOperationTest.h
│ │ │ ├── ProjFS_MoveFileTest.h
│ │ │ ├── ProjFS_MoveFolderTest.h
│ │ │ ├── ProjFS_MultiThreadsTest.h
│ │ │ ├── ProjFS_SetLinkTest.h
│ │ │ ├── ReadAndWriteTests.h
│ │ │ └── TrailingSlashTests.h
│ │ ├── packages.config
│ │ └── source/
│ │ ├── NtFunctions.cpp
│ │ ├── NtQueryDirectoryFileTests.cpp
│ │ ├── PlaceholderUtils.cpp
│ │ ├── ProjFS_BugRegressionTest.cpp
│ │ ├── ProjFS_DeleteFileTest.cpp
│ │ ├── ProjFS_DeleteFolderTest.cpp
│ │ ├── ProjFS_DirEnumTest.cpp
│ │ ├── ProjFS_FileAttributeTest.cpp
│ │ ├── ProjFS_FileEATest.cpp
│ │ ├── ProjFS_FileOperationTest.cpp
│ │ ├── ProjFS_MoveFileTest.cpp
│ │ ├── ProjFS_MoveFolderTest.cpp
│ │ ├── ProjFS_MultiThreadTest.cpp
│ │ ├── ProjFS_SetLinkTest.cpp
│ │ ├── ReadAndWriteTests.cpp
│ │ ├── TrailingSlashTests.cpp
│ │ ├── dllmain.cpp
│ │ └── stdafx.cpp
│ ├── GVFS.Payload/
│ │ ├── GVFS.Payload.csproj
│ │ └── layout.bat
│ ├── GVFS.PerfProfiling/
│ │ ├── GVFS.PerfProfiling.csproj
│ │ ├── ProfilingEnvironment.cs
│ │ └── Program.cs
│ ├── GVFS.Platform.Windows/
│ │ ├── ActiveEnumeration.cs
│ │ ├── CurrentUser.cs
│ │ ├── DiskLayoutUpgrades/
│ │ │ ├── DiskLayout14to15Upgrade_ModifiedPaths.cs
│ │ │ ├── DiskLayout15to16Upgrade_GitStatusCache.cs
│ │ │ ├── DiskLayout16to17Upgrade_FolderPlaceholderValues.cs
│ │ │ ├── DiskLayout17to18Upgrade_TombstoneFolderPlaceholders.cs
│ │ │ ├── DiskLayout18to19Upgrade_SqlitePlacholders.cs
│ │ │ └── WindowsDiskLayoutUpgradeData.cs
│ │ ├── GVFS.Platform.Windows.csproj
│ │ ├── HResultExtensions.cs
│ │ ├── PatternMatcher.cs
│ │ ├── PlatformLoader.Windows.cs
│ │ ├── ProjFSFilter.cs
│ │ ├── Readme.md
│ │ ├── WindowsFileBasedLock.cs
│ │ ├── WindowsFileSystem.Shared.cs
│ │ ├── WindowsFileSystem.cs
│ │ ├── WindowsFileSystemVirtualizer.cs
│ │ ├── WindowsGitHooksInstaller.cs
│ │ ├── WindowsGitInstallation.cs
│ │ ├── WindowsPhysicalDiskInfo.cs
│ │ ├── WindowsPlatform.Shared.cs
│ │ └── WindowsPlatform.cs
│ ├── GVFS.PostIndexChangedHook/
│ │ ├── GVFS.PostIndexChangedHook.vcxproj
│ │ ├── GVFS.PostIndexChangedHook.vcxproj.filters
│ │ ├── Version.rc
│ │ ├── main.cpp
│ │ ├── resource.h
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ └── targetver.h
│ ├── GVFS.ReadObjectHook/
│ │ ├── GVFS.ReadObjectHook.vcxproj
│ │ ├── GVFS.ReadObjectHook.vcxproj.filters
│ │ ├── Version.rc
│ │ ├── main.cpp
│ │ ├── packet.cpp
│ │ ├── packet.h
│ │ ├── resource.h
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ └── targetver.h
│ ├── GVFS.Service/
│ │ ├── Configuration.cs
│ │ ├── GVFS.Service.csproj
│ │ ├── GVFSMountProcess.cs
│ │ ├── GVFSService.Windows.cs
│ │ ├── Handlers/
│ │ │ ├── EnableAndAttachProjFSHandler.cs
│ │ │ ├── GetActiveRepoListHandler.cs
│ │ │ ├── INotificationHandler.cs
│ │ │ ├── MessageHandler.cs
│ │ │ ├── NotificationHandler.cs
│ │ │ ├── RegisterRepoHandler.cs
│ │ │ ├── RequestHandler.Windows.cs
│ │ │ ├── RequestHandler.cs
│ │ │ └── UnregisterRepoHandler.cs
│ │ ├── IRepoMounter.cs
│ │ ├── IRepoRegistry.cs
│ │ ├── Program.cs
│ │ ├── RepoRegistration.cs
│ │ └── RepoRegistry.cs
│ ├── GVFS.Tests/
│ │ ├── DataSources.cs
│ │ ├── GVFS.Tests.csproj
│ │ ├── NUnitRunner.cs
│ │ └── Should/
│ │ ├── EnumerableShouldExtensions.cs
│ │ ├── StringExtensions.cs
│ │ ├── StringShouldExtensions.cs
│ │ └── ValueShouldExtensions.cs
│ ├── GVFS.UnitTests/
│ │ ├── Category/
│ │ │ └── CategoryConstants.cs
│ │ ├── CommandLine/
│ │ │ ├── CacheVerbTests.cs
│ │ │ └── HooksInstallerTests.cs
│ │ ├── Common/
│ │ │ ├── AzDevOpsOrgFromNuGetFeedTests.cs
│ │ │ ├── BackgroundTaskQueueTests.cs
│ │ │ ├── CacheServerResolverTests.cs
│ │ │ ├── Database/
│ │ │ │ ├── GVFSDatabaseTests.cs
│ │ │ │ ├── PlaceholderTableTests.cs
│ │ │ │ ├── SparseTableTests.cs
│ │ │ │ └── TableTests.cs
│ │ │ ├── EnlistmentHydrationSummaryTests.cs
│ │ │ ├── EpochConverterTests.cs
│ │ │ ├── FileBasedDictionaryTests.cs
│ │ │ ├── GVFSEnlistmentHealthTests.cs
│ │ │ ├── GVFSEnlistmentTests.cs
│ │ │ ├── GVFSLockTests.cs
│ │ │ ├── Git/
│ │ │ │ ├── GitSslTests.cs
│ │ │ │ └── Sha1IdTests.cs
│ │ │ ├── GitCommandLineParserTests.cs
│ │ │ ├── GitConfigHelperTests.cs
│ │ │ ├── GitObjectsTests.cs
│ │ │ ├── GitPathConverterTests.cs
│ │ │ ├── GitStatusCacheTests.cs
│ │ │ ├── GitVersionTests.cs
│ │ │ ├── HydrationStatusCircuitBreakerTests.cs
│ │ │ ├── HydrationStatusErrorPathTests.cs
│ │ │ ├── JsonTracerTests.cs
│ │ │ ├── LegacyPlaceholderDatabaseTests.cs
│ │ │ ├── LibGit2RepoInvokerTests.cs
│ │ │ ├── LibGit2RepoSafeDirectoryTests.cs
│ │ │ ├── MissingTreeTrackerTests.cs
│ │ │ ├── ModifiedPathsDatabaseTests.cs
│ │ │ ├── NamedPipeStreamReaderWriterTests.cs
│ │ │ ├── NamedPipeTests.cs
│ │ │ ├── OrgInfoApiClientTests.cs
│ │ │ ├── PathsTests.cs
│ │ │ ├── PhysicalFileSystemDeleteTests.cs
│ │ │ ├── RefLogEntryTests.cs
│ │ │ ├── RetryBackoffTests.cs
│ │ │ ├── RetryConfigTests.cs
│ │ │ ├── RetryWrapperTests.cs
│ │ │ ├── SHA1UtilTests.cs
│ │ │ ├── WorktreeCommandParserTests.cs
│ │ │ ├── WorktreeEnlistmentTests.cs
│ │ │ ├── WorktreeInfoTests.cs
│ │ │ └── WorktreeNestedPathTests.cs
│ │ ├── Data/
│ │ │ ├── backward.txt
│ │ │ ├── caseChange.txt
│ │ │ ├── forward.txt
│ │ │ └── index_v4
│ │ ├── GVFS.UnitTests.csproj
│ │ ├── Git/
│ │ │ ├── GVFSGitObjectsTests.cs
│ │ │ ├── GitAuthenticationTests.cs
│ │ │ ├── GitObjectsTests.cs
│ │ │ └── GitProcessTests.cs
│ │ ├── Hooks/
│ │ │ ├── PostIndexChangedHookTests.cs
│ │ │ └── UnstageTests.cs
│ │ ├── Maintenance/
│ │ │ ├── GitMaintenanceQueueTests.cs
│ │ │ ├── GitMaintenanceStepTests.cs
│ │ │ ├── LooseObjectStepTests.cs
│ │ │ ├── PackfileMaintenanceStepTests.cs
│ │ │ └── PostFetchStepTests.cs
│ │ ├── Mock/
│ │ │ ├── Common/
│ │ │ │ ├── MockFileBasedLock.cs
│ │ │ │ ├── MockGVFSEnlistment.cs
│ │ │ │ ├── MockGitStatusCache.cs
│ │ │ │ ├── MockLocalGVFSConfig.cs
│ │ │ │ ├── MockLocalGVFSConfigBuilder.cs
│ │ │ │ ├── MockPhysicalGitObjects.cs
│ │ │ │ ├── MockPlatform.cs
│ │ │ │ ├── MockTracer.cs
│ │ │ │ └── Tracing/
│ │ │ │ └── MockListener.cs
│ │ │ ├── FileSystem/
│ │ │ │ ├── ConfigurableFileSystem.cs
│ │ │ │ ├── MockDirectory.cs
│ │ │ │ ├── MockFile.cs
│ │ │ │ ├── MockFileSystem.cs
│ │ │ │ ├── MockFileSystemCallbacks.cs
│ │ │ │ ├── MockFileSystemWithCallbacks.cs
│ │ │ │ └── MockPlatformFileSystem.cs
│ │ │ ├── Git/
│ │ │ │ ├── MockBatchHttpGitObjects.cs
│ │ │ │ ├── MockGVFSGitObjects.cs
│ │ │ │ ├── MockGitInstallation.cs
│ │ │ │ ├── MockGitProcess.cs
│ │ │ │ ├── MockGitRepo.cs
│ │ │ │ ├── MockHttpGitObjects.cs
│ │ │ │ └── MockLibGit2Repo.cs
│ │ │ ├── MockCacheServerInfo.cs
│ │ │ ├── MockTextWriter.cs
│ │ │ ├── ReusableMemoryStream.cs
│ │ │ └── Virtualization/
│ │ │ ├── Background/
│ │ │ │ └── MockBackgroundTaskManager.cs
│ │ │ ├── BlobSize/
│ │ │ │ └── MockBlobSizesDatabase.cs
│ │ │ ├── FileSystem/
│ │ │ │ └── MockFileSystemVirtualizer.cs
│ │ │ └── Projection/
│ │ │ └── MockGitIndexProjection.cs
│ │ ├── Prefetch/
│ │ │ ├── BatchObjectDownloadStageTests.cs
│ │ │ ├── BlobPrefetcherTests.cs
│ │ │ ├── DiffHelperTests.cs
│ │ │ ├── DiffTreeResultTests.cs
│ │ │ ├── PrefetchPacksDeserializerTests.cs
│ │ │ └── PrefetchTracingTests.cs
│ │ ├── Program.cs
│ │ ├── Readme.md
│ │ ├── Service/
│ │ │ └── RepoRegistryTests.cs
│ │ ├── Setup.cs
│ │ ├── Tracing/
│ │ │ ├── EventListenerTests.cs
│ │ │ ├── QueuedPipeStringWriterTests.cs
│ │ │ └── TelemetryDaemonEventListenerTests.cs
│ │ ├── Virtual/
│ │ │ ├── CommonRepoSetup.cs
│ │ │ ├── FileSystemVirtualizerTester.cs
│ │ │ └── TestsWithCommonRepo.cs
│ │ ├── Virtualization/
│ │ │ ├── FileSystemCallbacksTests.cs
│ │ │ └── Projection/
│ │ │ ├── GitIndexEntryTests.cs
│ │ │ ├── LazyUTF8StringTests.cs
│ │ │ ├── ObjectPoolTests.cs
│ │ │ └── SortedFolderEntriesTests.cs
│ │ └── Windows/
│ │ ├── CommandLine/
│ │ │ └── SparseVerbTests.cs
│ │ ├── Mock/
│ │ │ ├── MockVirtualizationInstance.cs
│ │ │ ├── MockWriteBuffer.cs
│ │ │ └── WindowsFileSystemVirtualizerTester.cs
│ │ ├── Platform/
│ │ │ └── ProjFSFilterTests.cs
│ │ ├── Virtualization/
│ │ │ ├── ActiveEnumerationTests.cs
│ │ │ ├── PatternMatcherTests.cs
│ │ │ └── WindowsFileSystemVirtualizerTests.cs
│ │ └── WindowsFileBasedLockTests.cs
│ ├── GVFS.VirtualFileSystemHook/
│ │ ├── GVFS.VirtualFileSystemHook.vcxproj
│ │ ├── GVFS.VirtualFileSystemHook.vcxproj.filters
│ │ ├── Version.rc
│ │ ├── main.cpp
│ │ ├── resource.h
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ └── targetver.h
│ ├── GVFS.Virtualization/
│ │ ├── Background/
│ │ │ ├── BackgroundFileSystemTaskRunner.cs
│ │ │ ├── FileSystemTask.cs
│ │ │ ├── FileSystemTaskQueue.cs
│ │ │ └── FileSystemTaskResult.cs
│ │ ├── BlobSize/
│ │ │ ├── BlobSizes.cs
│ │ │ └── BlobSizesException.cs
│ │ ├── FileSystem/
│ │ │ ├── FSResult.cs
│ │ │ ├── FileSystemResult.cs
│ │ │ ├── FileSystemVirtualizer.cs
│ │ │ ├── UpdateFailureReason.cs
│ │ │ └── UpdatePlaceholderType.cs
│ │ ├── FileSystemCallbacks.cs
│ │ ├── GVFS.Virtualization.csproj
│ │ ├── InternalsVisibleTo.cs
│ │ └── Projection/
│ │ ├── GitIndexProjection.FileData.cs
│ │ ├── GitIndexProjection.FileTypeAndMode.cs
│ │ ├── GitIndexProjection.FolderData.cs
│ │ ├── GitIndexProjection.FolderEntryData.cs
│ │ ├── GitIndexProjection.GitIndexEntry.cs
│ │ ├── GitIndexProjection.GitIndexParser.cs
│ │ ├── GitIndexProjection.LazyUTF8String.cs
│ │ ├── GitIndexProjection.ObjectPool.cs
│ │ ├── GitIndexProjection.PoolAllocationMultipliers.cs
│ │ ├── GitIndexProjection.SortedFolderEntries.cs
│ │ ├── GitIndexProjection.SparseFolder.cs
│ │ ├── GitIndexProjection.cs
│ │ ├── IProfilerOnlyIndexProjection.cs
│ │ ├── ProjectedFileInfo.cs
│ │ ├── Readme.md
│ │ └── SizesUnavailableException.cs
│ └── GitHooksLoader/
│ ├── GitHooksLoader.cpp
│ ├── GitHooksLoader.vcxproj
│ ├── GitHooksLoader.vcxproj.filters
│ ├── Version.rc
│ ├── resource.h
│ ├── stdafx.cpp
│ ├── stdafx.h
│ └── targetver.h
├── GVFS.sln
├── GvFlt_EULA.md
├── License.md
├── Protocol.md
├── Readme.md
├── SECURITY.md
├── ThirdPartyNotices.txt
├── Version.props
├── docs/
│ ├── faq.md
│ ├── getting-started.md
│ ├── index.md
│ └── troubleshooting.md
├── global.json
├── nuget.config
└── scripts/
├── Build.bat
├── CreateBuildArtifacts.bat
├── InitializeEnvironment.bat
├── RunFunctionalTests-Dev.ps1
├── RunFunctionalTests.bat
├── RunUnitTests.bat
├── StopAllServices.bat
└── StopService.bat
Showing preview only (554K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5785 symbols across 535 files)
FILE: GVFS/FastFetch/CheckoutPrefetcher.cs
class CheckoutPrefetcher (line 15) | public class CheckoutPrefetcher : BlobPrefetcher
method CheckoutPrefetcher (line 21) | public CheckoutPrefetcher(
method Prefetch (line 47) | public override void Prefetch(string branchOrCommit, bool isBranch)
method UpdateRefs (line 178) | protected override void UpdateRefs(string branchOrCommit, bool isBranc...
method GetSourceIndex (line 197) | private Index GetSourceIndex()
method GetIsIndexSigningOff (line 211) | private bool GetIsIndexSigningOff()
FILE: GVFS/FastFetch/CheckoutStage.cs
class CheckoutStage (line 16) | public class CheckoutStage : PrefetchPipelineStage
method CheckoutStage (line 38) | public CheckoutStage(int maxParallel, IEnumerable<string> folderList, ...
method DoBeforeWork (line 69) | protected override void DoBeforeWork()
method DoWork (line 85) | protected override void DoWork()
method DoAfterWork (line 127) | protected override void DoAfterWork()
method HandleAllDirectoryOperations (line 158) | private void HandleAllDirectoryOperations()
method HandleAllFileDeleteOperations (line 225) | private void HandleAllFileDeleteOperations()
method HandleAllFileAddOperations (line 255) | private void HandleAllFileAddOperations()
FILE: GVFS/FastFetch/FastFetchLibGit2Repo.cs
class FastFetchLibGit2Repo (line 11) | public class FastFetchLibGit2Repo : LibGit2Repo
method FastFetchLibGit2Repo (line 13) | public FastFetchLibGit2Repo(ITracer tracer, string repoPath)
method TryCopyBlobToFile (line 18) | public virtual bool TryCopyBlobToFile(string sha, IEnumerable<PathWith...
FILE: GVFS/FastFetch/FastFetchVerb.cs
class FastFetchVerb (line 11) | [Verb("fastfetch", HelpText = "Fast-fetch a branch")]
method Execute (line 147) | public void Execute()
method ExecuteWithExitCode (line 152) | private int ExecuteWithExitCode()
method GetRemoteUrl (line 312) | private string GetRemoteUrl(Enlistment enlistment)
method GetFolderPrefetcher (line 328) | private BlobPrefetcher GetFolderPrefetcher(ITracer tracer, Enlistment ...
FILE: GVFS/FastFetch/GitEnlistment.cs
class GitEnlistment (line 7) | public class GitEnlistment : Enlistment
method GitEnlistment (line 9) | private GitEnlistment(string repoRoot, string gitBinPath)
method CreateFromCurrentDirectory (line 35) | public static GitEnlistment CreateFromCurrentDirectory(string gitBinPath)
FILE: GVFS/FastFetch/Index.cs
class Index (line 17) | public class Index
method Index (line 53) | public Index(
method UpdateFileSizesAndTimes (line 85) | public void UpdateFileSizesAndTimes(BlockingCollection<string> addedOr...
method Parse (line 136) | public void Parse()
method FromDotnetFullPathToGitRelativePath (line 147) | private static string FromDotnetFullPathToGitRelativePath(string path,...
method FromGitRelativePathToDotnetFullPath (line 152) | private static string FromGitRelativePathToDotnetFullPath(string path,...
method GetMemoryMappedFile (line 157) | private MemoryMappedFile GetMemoryMappedFile()
method UpdateFileInformationFromWorkingTree (line 162) | private bool UpdateFileInformationFromWorkingTree(MemoryMappedViewAcce...
method UpdateFileInformationFromDiskForFiles (line 190) | private bool UpdateFileInformationFromDiskForFiles(MemoryMappedViewAcc...
method UpdateFileInformationForAllEntries (line 219) | private bool UpdateFileInformationForAllEntries(MemoryMappedViewAccess...
method SignIndex (line 282) | private void SignIndex()
method WriteFastFetchIndexVersionMarker (line 303) | public void WriteFastFetchIndexVersionMarker()
method IsFastFetchVersionMarkerCurrent (line 316) | private bool IsFastFetchVersionMarkerCurrent()
method ParseIndex (line 331) | private void ParseIndex(Stream indexStream)
method ReadReplaceLength (line 414) | private int ReadReplaceLength(Stream stream)
method ReadUInt32 (line 435) | private uint ReadUInt32(byte[] buffer, Stream stream)
method ReadUInt16 (line 445) | private ushort ReadUInt16(byte[] buffer, Stream stream)
class IndexEntry (line 457) | internal class IndexEntry
method IndexEntry (line 464) | public IndexEntry(MemoryMappedViewAccessor indexView, long offset)
type EntryOffsets (line 473) | private enum EntryOffsets
method HasInitializedCTimeEntry (line 658) | public static bool HasInitializedCTimeEntry(MemoryMappedViewAccessor...
method ReadUInt32 (line 663) | private uint ReadUInt32(EntryOffsets fromOffset)
method WriteUInt32 (line 668) | private void WriteUInt32(EntryOffsets fromOffset, uint data)
method ReadUInt16 (line 673) | private ushort ReadUInt16(EntryOffsets fromOffset)
method WriteUInt16 (line 678) | private void WriteUInt16(EntryOffsets fromOffset, ushort data)
method ToGitTime (line 683) | private IndexEntryTime ToGitTime(DateTime datetime)
method ToDotnetTime (line 700) | private DateTime ToDotnetTime(uint seconds, uint nanosecondFraction)
class IndexEntryTime (line 706) | private class IndexEntryTime
FILE: GVFS/FastFetch/IndexLock.cs
class IndexLock (line 47) | public class IndexLock
method IndexLock (line 53) | public IndexLock(string repositoryRoot, ITracer tracer)
method Dispose (line 68) | public void Dispose()
FILE: GVFS/FastFetch/NativeMethods.cs
class NativeMethods (line 11) | internal static class NativeMethods
method WriteFile (line 15) | public static unsafe void WriteFile(ITracer tracer, byte* originalData...
method TryStatFileAndUpdateIndex (line 52) | public static bool TryStatFileAndUpdateIndex(ITracer tracer, string pa...
method OpenForWrite (line 78) | private static SafeFileHandle OpenForWrite(ITracer tracer, string file...
method CreateFile (line 105) | [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
method WriteFile (line 115) | [DllImport("kernel32.dll", SetLastError = true)]
FILE: GVFS/FastFetch/Program.cs
class Program (line 6) | public class Program
method Main (line 8) | public static void Main(string[] args)
FILE: GVFS/FastFetch/WorkingTree.cs
class WorkingTree (line 9) | public static class WorkingTree
method ForAllFiles (line 18) | public static void ForAllFiles(string repoRoot, Action<string, FileInf...
method ForAllDirectories (line 23) | public static void ForAllDirectories(DirectoryInfo dir, Action<string,...
FILE: GVFS/GVFS.Common/AzDevOpsOrgFromNuGetFeed.cs
class AzDevOpsOrgFromNuGetFeed (line 5) | public class AzDevOpsOrgFromNuGetFeed
method TryParseOrg (line 11) | public static bool TryParseOrg(string packageFeedUrl, out string orgName)
method TryCreateCredentialQueryUrl (line 36) | public static bool TryCreateCredentialQueryUrl(string packageFeedUrl, ...
FILE: GVFS/GVFS.Common/ConcurrentHashSet.cs
class ConcurrentHashSet (line 7) | public class ConcurrentHashSet<T> : IEnumerable<T>
method ConcurrentHashSet (line 11) | public ConcurrentHashSet()
method ConcurrentHashSet (line 16) | public ConcurrentHashSet(IEqualityComparer<T> comparer)
method Add (line 26) | public bool Add(T entry)
method Contains (line 31) | public bool Contains(T item)
method Clear (line 36) | public void Clear()
method GetEnumerator (line 41) | public IEnumerator<T> GetEnumerator()
method GetEnumerator (line 46) | IEnumerator IEnumerable.GetEnumerator()
method TryRemove (line 51) | public bool TryRemove(T key)
FILE: GVFS/GVFS.Common/ConsoleHelper.cs
class ConsoleHelper (line 8) | public static class ConsoleHelper
type ActionResult (line 10) | public enum ActionResult
method ShowStatusWhileRunning (line 17) | public static bool ShowStatusWhileRunning(
method ShowStatusWhileRunning (line 42) | public static ActionResult ShowStatusWhileRunning(
method GetGVFSLogMessage (line 143) | public static string GetGVFSLogMessage(string enlistmentRoot)
FILE: GVFS/GVFS.Common/Database/GVFSDatabase.cs
class GVFSDatabase (line 14) | public class GVFSDatabase : IGVFSConnectionPool, IDisposable
method GVFSDatabase (line 24) | public GVFSDatabase(PhysicalFileSystem fileSystem, string enlistmentRo...
method NormalizePath (line 48) | public static string NormalizePath(string path)
method Dispose (line 53) | public void Dispose()
method GetConnection (line 71) | IDbConnection IGVFSConnectionPool.GetConnection()
method ReturnToPool (line 87) | private void ReturnToPool(IDbConnection connection)
method Initialize (line 105) | private void Initialize()
class GVFSConnection (line 133) | private class GVFSConnection : IDbConnection
method GVFSConnection (line 138) | public GVFSConnection(GVFSDatabase database, IDbConnection connection)
method BeginTransaction (line 156) | public IDbTransaction BeginTransaction()
method BeginTransaction (line 161) | public IDbTransaction BeginTransaction(IsolationLevel il)
method ChangeDatabase (line 166) | public void ChangeDatabase(string databaseName)
method Close (line 171) | public void Close()
method CreateCommand (line 176) | public IDbCommand CreateCommand()
method Dispose (line 181) | public void Dispose()
method Open (line 186) | public void Open()
FILE: GVFS/GVFS.Common/Database/GVFSDatabaseException.cs
class GVFSDatabaseException (line 5) | public class GVFSDatabaseException : Exception
method GVFSDatabaseException (line 7) | public GVFSDatabaseException(string message, Exception innerException)
FILE: GVFS/GVFS.Common/Database/IDbCommandExtensions.cs
class IDbCommandExtensions (line 8) | public static class IDbCommandExtensions
method AddParameter (line 10) | public static IDbDataParameter AddParameter(this IDbCommand command, s...
FILE: GVFS/GVFS.Common/Database/IDbConnectionFactory.cs
type IDbConnectionFactory (line 8) | public interface IDbConnectionFactory
method OpenNewConnection (line 10) | IDbConnection OpenNewConnection(string databasePath);
FILE: GVFS/GVFS.Common/Database/IGVFSConnectionPool.cs
type IGVFSConnectionPool (line 8) | public interface IGVFSConnectionPool
method GetConnection (line 10) | IDbConnection GetConnection();
FILE: GVFS/GVFS.Common/Database/IPlaceholderCollection.cs
type IPlaceholderCollection (line 8) | public interface IPlaceholderCollection
method GetCount (line 10) | int GetCount();
method GetAllEntries (line 11) | void GetAllEntries(out List<IPlaceholderData> filePlaceholders, out Li...
method GetFilePlaceholdersCount (line 12) | int GetFilePlaceholdersCount();
method GetFolderPlaceholdersCount (line 13) | int GetFolderPlaceholdersCount();
method GetAllFilePaths (line 15) | HashSet<string> GetAllFilePaths();
method AddPartialFolder (line 17) | void AddPartialFolder(string path, string sha);
method AddExpandedFolder (line 18) | void AddExpandedFolder(string path);
method AddPossibleTombstoneFolder (line 19) | void AddPossibleTombstoneFolder(string path);
method AddFile (line 21) | void AddFile(string path, string sha);
method Remove (line 23) | void Remove(string path);
method RemoveAllEntriesForFolder (line 24) | List<IPlaceholderData> RemoveAllEntriesForFolder(string path);
method AddPlaceholderData (line 25) | void AddPlaceholderData(IPlaceholderData data);
FILE: GVFS/GVFS.Common/Database/IPlaceholderData.cs
type IPlaceholderData (line 6) | public interface IPlaceholderData
FILE: GVFS/GVFS.Common/Database/ISparseCollection.cs
type ISparseCollection (line 7) | public interface ISparseCollection
method GetAll (line 9) | HashSet<string> GetAll();
method Add (line 11) | void Add(string directory);
method Remove (line 12) | void Remove(string directory);
FILE: GVFS/GVFS.Common/Database/PlaceholderTable.cs
class PlaceholderTable (line 11) | public class PlaceholderTable : IPlaceholderCollection
method PlaceholderTable (line 16) | public PlaceholderTable(IGVFSConnectionPool connectionPool)
method CreateTable (line 21) | public static void CreateTable(IDbConnection connection, bool caseSens...
method GetCount (line 31) | public int GetCount()
method GetAllEntries (line 48) | public void GetAllEntries(out List<IPlaceholderData> filePlaceholders,...
method GetAllFilePaths (line 80) | public HashSet<string> GetAllFilePaths()
method AddPlaceholderData (line 106) | public void AddPlaceholderData(IPlaceholderData data)
method AddFile (line 129) | public void AddFile(string path, string sha)
method AddPartialFolder (line 139) | public void AddPartialFolder(string path, string sha)
method AddExpandedFolder (line 144) | public void AddExpandedFolder(string path)
method AddPossibleTombstoneFolder (line 149) | public void AddPossibleTombstoneFolder(string path)
method RemoveAllEntriesForFolder (line 154) | public List<IPlaceholderData> RemoveAllEntriesForFolder(string path)
method Remove (line 188) | public void Remove(string path)
method GetFilePlaceholdersCount (line 210) | public int GetFilePlaceholdersCount()
method GetFolderPlaceholdersCount (line 227) | public int GetFolderPlaceholdersCount()
method ReadPlaceholders (line 244) | private static void ReadPlaceholders(IDbCommand command, Action<Placeh...
method Insert (line 264) | private void Insert(PlaceholderData placeholder)
class PlaceholderData (line 296) | public class PlaceholderData : IPlaceholderData
type PlaceholderType (line 298) | public enum PlaceholderType
FILE: GVFS/GVFS.Common/Database/SparseTable.cs
class SparseTable (line 8) | public class SparseTable : ISparseCollection
method SparseTable (line 13) | public SparseTable(IGVFSConnectionPool connectionPool)
method CreateTable (line 18) | public static void CreateTable(IDbConnection connection, bool caseSens...
method Add (line 28) | public void Add(string directoryPath)
method GetAll (line 50) | public HashSet<string> GetAll()
method Remove (line 76) | public void Remove(string directoryPath)
FILE: GVFS/GVFS.Common/Database/SqliteDatabase.cs
class SqliteDatabase (line 12) | public class SqliteDatabase : IDbConnectionFactory
method HasIssue (line 14) | public static bool HasIssue(string databasePath, PhysicalFileSystem fi...
method CreateConnectionString (line 60) | public static string CreateConnectionString(string databasePath)
method OpenNewConnection (line 67) | public IDbConnection OpenNewConnection(string databasePath)
FILE: GVFS/GVFS.Common/DiskLayoutUpgrades/DiskLayoutUpgrade.cs
class DiskLayoutUpgrade (line 11) | public abstract class DiskLayoutUpgrade
method TryRunAllUpgrades (line 19) | public static bool TryRunAllUpgrades(string enlistmentRoot)
method TryCheckDiskLayoutVersion (line 67) | public static bool TryCheckDiskLayoutVersion(ITracer tracer, string en...
method TryUpgrade (line 119) | public abstract bool TryUpgrade(ITracer tracer, string enlistmentRoot);
method TryDeleteFolder (line 121) | protected bool TryDeleteFolder(ITracer tracer, string folderName)
method TryDeleteFile (line 137) | protected bool TryDeleteFile(ITracer tracer, string fileName)
method TryRenameFolderForDelete (line 152) | protected bool TryRenameFolderForDelete(ITracer tracer, string folderN...
method TrySetGitConfig (line 171) | protected bool TrySetGitConfig(ITracer tracer, string enlistmentRoot, ...
method RegisterUpgrade (line 206) | private static void RegisterUpgrade(DiskLayoutUpgrade upgrade)
method CheckLayoutVersionWasIncremented (line 225) | private static bool CheckLayoutVersionWasIncremented(JsonTracer tracer...
method TryFindUpgrade (line 259) | private static bool TryFindUpgrade(JsonTracer tracer, string enlistmen...
method TryGetDiskLayoutVersion (line 306) | private static bool TryGetDiskLayoutVersion(
method StartLogFile (line 336) | private static void StartLogFile(string enlistmentRoot, JsonTracer tra...
class MajorUpgrade (line 351) | public abstract class MajorUpgrade : DiskLayoutUpgrade
method TryIncrementMajorVersion (line 363) | protected bool TryIncrementMajorVersion(ITracer tracer, string enlis...
class MinorUpgrade (line 382) | public abstract class MinorUpgrade : DiskLayoutUpgrade
method TryIncrementMinorVersion (line 389) | protected bool TryIncrementMinorVersion(ITracer tracer, string enlis...
FILE: GVFS/GVFS.Common/DiskLayoutUpgrades/DiskLayoutUpgrade_SqlitePlaceholders.cs
class DiskLayoutUpgrade_SqlitePlaceholders (line 11) | public abstract class DiskLayoutUpgrade_SqlitePlaceholders : DiskLayoutU...
method TryUpgrade (line 13) | public override bool TryUpgrade(ITracer tracer, string enlistmentRoot)
FILE: GVFS/GVFS.Common/DiskLayoutUpgrades/DiskLayoutVersion.cs
class DiskLayoutVersion (line 3) | public class DiskLayoutVersion
method DiskLayoutVersion (line 5) | public DiskLayoutVersion(int currentMajorVersion, int currentMinorVers...
FILE: GVFS/GVFS.Common/Enlistment.cs
class Enlistment (line 8) | public abstract class Enlistment
method Enlistment (line 10) | protected Enlistment(
method GetNewLogFileName (line 84) | public static string GetNewLogFileName(
method CreateGitProcess (line 116) | public virtual GitProcess CreateGitProcess()
FILE: GVFS/GVFS.Common/EpochConverter.cs
class EpochConverter (line 5) | public static class EpochConverter
method ToUnixEpochSeconds (line 9) | public static long ToUnixEpochSeconds(DateTime datetime)
method FromUnixEpochSeconds (line 14) | public static DateTime FromUnixEpochSeconds(long secondsSinceEpoch)
FILE: GVFS/GVFS.Common/FileBasedCollection.cs
class FileBasedCollection (line 12) | public abstract class FileBasedCollection : IDisposable
method FileBasedCollection (line 38) | protected FileBasedCollection(ITracer tracer, PhysicalFileSystem fileS...
method Dispose (line 55) | public void Dispose()
method ForceFlush (line 63) | public void ForceFlush()
method WriteAndReplaceDataFile (line 75) | protected void WriteAndReplaceDataFile(Func<IEnumerable<string>> getDa...
method FormatAddLine (line 158) | protected string FormatAddLine(string line)
method FormatRemoveLine (line 163) | protected string FormatRemoveLine(string line)
method WriteAddEntry (line 169) | protected void WriteAddEntry(string value, Action synchronizedAction =...
method WriteRemoveEntry (line 184) | protected void WriteRemoveEntry(string key, Action synchronizedAction ...
method DeleteDataFileIfCondition (line 198) | protected void DeleteDataFileIfCondition(Func<bool> condition)
method TryLoadFromDisk (line 215) | protected bool TryLoadFromDisk<TKey, TValue>(
method CreateEventMetadata (line 308) | private static EventMetadata CreateEventMetadata(Exception e = null)
method CloseDataFile (line 323) | private void CloseDataFile()
method OpenOrCreateDataFile (line 337) | private void OpenOrCreateDataFile(bool retryUntilSuccess)
method WriteToDisk (line 389) | private void WriteToDisk(string value)
method RemoveLastEntryIfInvalid (line 407) | private void RemoveLastEntryIfInvalid()
method TryWriteTempFile (line 437) | private bool TryWriteTempFile(Func<IEnumerable<string>> getDataLines, ...
FILE: GVFS/GVFS.Common/FileBasedCollectionException.cs
class FileBasedCollectionException (line 5) | public class FileBasedCollectionException : Exception
method FileBasedCollectionException (line 7) | public FileBasedCollectionException(Exception innerException)
FILE: GVFS/GVFS.Common/FileBasedDictionary.cs
class FileBasedDictionary (line 10) | public class FileBasedDictionary<TKey, TValue> : FileBasedCollection
method FileBasedDictionary (line 14) | private FileBasedDictionary(
method TryCreate (line 24) | public static bool TryCreate(
method SetValuesAndFlush (line 51) | public void SetValuesAndFlush(IEnumerable<KeyValuePair<TKey, TValue>> ...
method SetValueAndFlush (line 68) | public void SetValueAndFlush(TKey key, TValue value)
method TryGetValue (line 81) | public bool TryGetValue(TKey key, out TValue value)
method RemoveAndFlush (line 93) | public void RemoveAndFlush(TKey key)
method GetAllKeysAndValues (line 109) | public Dictionary<TKey, TValue> GetAllKeysAndValues()
method Flush (line 114) | private void Flush()
method TryParseAddLine (line 119) | private bool TryParseAddLine(string line, out TKey key, out TValue val...
method TryParseRemoveLine (line 139) | private bool TryParseRemoveLine(string line, out TKey key, out string ...
method HandleAddLine (line 156) | private void HandleAddLine(TKey key, TValue value)
method GenerateDataLines (line 161) | private IEnumerable<string> GenerateDataLines()
FILE: GVFS/GVFS.Common/FileBasedLock.cs
class FileBasedLock (line 7) | public abstract class FileBasedLock : IDisposable
method FileBasedLock (line 9) | public FileBasedLock(
method TryAcquireLock (line 23) | public bool TryAcquireLock()
method TryAcquireLock (line 39) | public abstract bool TryAcquireLock(out Exception lockException);
method Dispose (line 41) | public abstract void Dispose();
FILE: GVFS/GVFS.Common/FileSystem/DirectoryItemInfo.cs
class DirectoryItemInfo (line 3) | public class DirectoryItemInfo
FILE: GVFS/GVFS.Common/FileSystem/FileProperties.cs
class FileProperties (line 6) | public class FileProperties
method FileProperties (line 11) | public FileProperties(FileAttributes attributes, DateTime creationTime...
FILE: GVFS/GVFS.Common/FileSystem/FlushToDiskFileStream.cs
class FlushToDiskFileStream (line 5) | public class FlushToDiskFileStream : FileStream
method FlushToDiskFileStream (line 7) | public FlushToDiskFileStream(string path, FileMode mode)
method FlushToDiskFileStream (line 12) | public FlushToDiskFileStream(string path, FileMode mode, FileAccess ac...
method FlushToDiskFileStream (line 17) | public FlushToDiskFileStream(string path, FileMode mode, FileAccess ac...
method Flush (line 22) | public override void Flush()
FILE: GVFS/GVFS.Common/FileSystem/HooksInstaller.cs
class HooksInstaller (line 13) | public static class HooksInstaller
method HooksInstaller (line 23) | static HooksInstaller()
method MergeHooksData (line 28) | public static string MergeHooksData(string[] defaultHooksLines, string...
method InstallHooks (line 54) | public static bool InstallHooks(GVFSContext context, out string error)
method TryUpdateHooks (line 91) | public static bool TryUpdateHooks(GVFSContext context, out string erro...
method CopyHook (line 105) | public static void CopyHook(GVFSContext context, string sourcePath, st...
method TryHooksInstallationAction (line 122) | public static bool TryHooksInstallationAction(Action action, out strin...
method TryUpdateHook (line 155) | private static bool TryUpdateHook(
class HooksConfigurationException (line 225) | public class HooksConfigurationException : Exception
method HooksConfigurationException (line 227) | public HooksConfigurationException(string message)
class HookData (line 233) | private class HookData
method HookData (line 235) | public HookData(string name, string path, string executableName)
FILE: GVFS/GVFS.Common/FileSystem/IKernelDriver.cs
type IKernelDriver (line 7) | public interface IKernelDriver
method IsSupported (line 17) | bool IsSupported(string normalizedEnlistmentRootPath, out string warni...
method TryFlushLogs (line 18) | bool TryFlushLogs(out string errors);
method TryPrepareFolderForCallbacks (line 19) | bool TryPrepareFolderForCallbacks(string folderPath, out string error,...
method IsReady (line 20) | bool IsReady(JsonTracer tracer, string enlistmentRoot, TextWriter outp...
method IsGVFSUpgradeSupported (line 21) | bool IsGVFSUpgradeSupported();
method RegisterForOfflineIO (line 22) | bool RegisterForOfflineIO();
method UnregisterForOfflineIO (line 23) | bool UnregisterForOfflineIO();
FILE: GVFS/GVFS.Common/FileSystem/IPlatformFileSystem.cs
type IPlatformFileSystem (line 6) | public interface IPlatformFileSystem
method FlushFileBuffers (line 9) | void FlushFileBuffers(string path);
method MoveAndOverwriteFile (line 10) | void MoveAndOverwriteFile(string sourceFileName, string destinationFil...
method TryGetNormalizedPath (line 11) | bool TryGetNormalizedPath(string path, out string normalizedPath, out ...
method SetDirectoryLastWriteTime (line 12) | void SetDirectoryLastWriteTime(string path, DateTime lastWriteTime, ou...
method ChangeMode (line 13) | void ChangeMode(string path, ushort mode);
method HydrateFile (line 14) | bool HydrateFile(string fileName, byte[] buffer);
method IsExecutable (line 15) | bool IsExecutable(string filePath);
method IsSocket (line 16) | bool IsSocket(string filePath);
method TryCreateDirectoryAccessibleByAuthUsers (line 17) | bool TryCreateDirectoryAccessibleByAuthUsers(string directoryPath, out...
method TryCreateDirectoryWithAdminAndUserModifyPermissions (line 18) | bool TryCreateDirectoryWithAdminAndUserModifyPermissions(string direct...
method TryCreateOrUpdateDirectoryToAdminModifyPermissions (line 19) | bool TryCreateOrUpdateDirectoryToAdminModifyPermissions(ITracer tracer...
method IsFileSystemSupported (line 20) | bool IsFileSystemSupported(string path, out string error);
method EnsureDirectoryIsOwnedByCurrentUser (line 21) | void EnsureDirectoryIsOwnedByCurrentUser(string workingDirectoryRoot);
FILE: GVFS/GVFS.Common/FileSystem/PhysicalFileSystem.cs
class PhysicalFileSystem (line 12) | public class PhysicalFileSystem
method DeleteDirectory (line 16) | public virtual void DeleteDirectory(string path, bool recursive = true...
method MoveDirectory (line 52) | public virtual void MoveDirectory(string sourceDirName, string destDir...
method CopyDirectoryRecursive (line 57) | public virtual void CopyDirectoryRecursive(
method FileExists (line 86) | public virtual bool FileExists(string path)
method DirectoryExists (line 91) | public virtual bool DirectoryExists(string path)
method CopyFile (line 96) | public virtual void CopyFile(string sourcePath, string destinationPath...
method DeleteFile (line 101) | public virtual void DeleteFile(string path)
method ReadAllText (line 106) | public virtual string ReadAllText(string path)
method ReadAllBytes (line 111) | public virtual byte[] ReadAllBytes(string path)
method ReadLines (line 116) | public virtual IEnumerable<string> ReadLines(string path)
method WriteAllText (line 121) | public virtual void WriteAllText(string path, string contents)
method TryWriteAllText (line 126) | public virtual bool TryWriteAllText(string path, string contents)
method OpenFileStream (line 147) | public Stream OpenFileStream(string path, FileMode fileMode, FileAcces...
method MoveAndOverwriteFile (line 152) | public virtual void MoveAndOverwriteFile(string sourceFileName, string...
method TryGetNormalizedPath (line 157) | public virtual bool TryGetNormalizedPath(string path, out string norma...
method OpenFileStream (line 162) | public virtual Stream OpenFileStream(string path, FileMode fileMode, F...
method FlushFileBuffers (line 172) | public virtual void FlushFileBuffers(string path)
method CreateDirectory (line 177) | public virtual void CreateDirectory(string path)
method TryCreateDirectoryWithAdminAndUserModifyPermissions (line 182) | public virtual bool TryCreateDirectoryWithAdminAndUserModifyPermission...
method TryCreateOrUpdateDirectoryToAdminModifyPermissions (line 187) | public virtual bool TryCreateOrUpdateDirectoryToAdminModifyPermissions...
method IsSymLink (line 192) | public virtual bool IsSymLink(string path)
method ItemsInDirectory (line 197) | public virtual IEnumerable<DirectoryItemInfo> ItemsInDirectory(string ...
method EnumerateDirectories (line 218) | public virtual IEnumerable<string> EnumerateDirectories(string path)
method GetFileProperties (line 223) | public virtual FileProperties GetFileProperties(string path)
method GetAttributes (line 241) | public virtual FileAttributes GetAttributes(string path)
method SetAttributes (line 246) | public virtual void SetAttributes(string path, FileAttributes fileAttr...
method MoveFile (line 251) | public virtual void MoveFile(string sourcePath, string targetPath)
method GetFiles (line 256) | public virtual string[] GetFiles(string directoryPath, string mask)
method GetVersionInfo (line 261) | public virtual FileVersionInfo GetVersionInfo(string path)
method FileVersionsMatch (line 266) | public virtual bool FileVersionsMatch(FileVersionInfo versionInfo1, Fi...
method ProductVersionsMatch (line 271) | public virtual bool ProductVersionsMatch(FileVersionInfo versionInfo1,...
method TryWriteTempFileAndRename (line 276) | public bool TryWriteTempFileAndRename(string destinationPath, string c...
method TryCopyToTempFileAndRename (line 313) | public bool TryCopyToTempFileAndRename(string sourcePath, string desti...
method TryCreateDirectory (line 342) | public bool TryCreateDirectory(string path, out Exception exception)
method TryDeleteDirectory (line 364) | public bool TryDeleteDirectory(string path, out Exception exception)
method TryDeleteFile (line 393) | public bool TryDeleteFile(string path)
method TryDeleteFile (line 406) | public bool TryDeleteFile(string path, out Exception exception)
method TryDeleteFile (line 443) | public bool TryDeleteFile(string path, string metadataKey, EventMetada...
method TryWaitForDelete (line 474) | public bool TryWaitForDelete(
FILE: GVFS/GVFS.Common/GVFSConstants.cs
class GVFSConstants (line 5) | public static partial class GVFSConstants
class GitConfig (line 26) | public static class GitConfig
class LocalGVFSConfig (line 53) | public static class LocalGVFSConfig
class GitStatusCache (line 62) | public static class GitStatusCache
class Service (line 67) | public static class Service
class MediaTypes (line 73) | public static class MediaTypes
class Endpoints (line 81) | public static class Endpoints
class SpecialGitFiles (line 90) | public static class SpecialGitFiles
class LogFileTypes (line 96) | public static class LogFileTypes
class DotGVFS (line 116) | public static class DotGVFS
class Databases (line 122) | public static class Databases
class GitStatusCache (line 133) | public static class GitStatusCache
class HydrationStatus (line 139) | public static class HydrationStatus
class DotGit (line 145) | public static class DotGit
class Logs (line 168) | public static class Logs
class Hooks (line 180) | public static class Hooks
class Info (line 197) | public static class Info
class Objects (line 210) | public static class Objects
class Info (line 214) | public static class Info
class Pack (line 223) | public static class Pack
class Refs (line 230) | public static class Refs
class Heads (line 234) | public static class Heads
class InstallationCapabilityFiles (line 242) | public static class InstallationCapabilityFiles
class VerbParameters (line 247) | public static class VerbParameters
class Mount (line 251) | public static class Mount
class Unmount (line 263) | public static class Unmount
class UpgradeVerbMessages (line 269) | public static class UpgradeVerbMessages
FILE: GVFS/GVFS.Common/GVFSContext.cs
class GVFSContext (line 8) | public class GVFSContext : IDisposable
method GVFSContext (line 12) | public GVFSContext(ITracer tracer, PhysicalFileSystem fileSystem, GitR...
method Dispose (line 28) | public void Dispose()
method Dispose (line 34) | protected virtual void Dispose(bool disposing)
FILE: GVFS/GVFS.Common/GVFSEnlistment.Shared.cs
class GVFSEnlistment (line 9) | public partial class GVFSEnlistment
method IsUnattended (line 11) | public static bool IsUnattended(ITracer tracer)
method IsPathInsideDirectory (line 37) | public static bool IsPathInsideDirectory(string path, string directory)
method GetWorktreePipeSuffix (line 53) | public static string GetWorktreePipeSuffix(string directory)
method TryGetWorktreeInfo (line 65) | public static WorktreeInfo TryGetWorktreeInfo(string directory)
method TryGetWorktreeInfo (line 77) | public static WorktreeInfo TryGetWorktreeInfo(string directory, out st...
method TryParseWorktreeGitFile (line 116) | private static WorktreeInfo TryParseWorktreeGitFile(string worktreeRoo...
method GetKnownWorktreePaths (line 180) | public static string[] GetKnownWorktreePaths(string gitDir)
class WorktreeInfo (line 215) | public class WorktreeInfo
method GetEnlistmentRoot (line 229) | public string GetEnlistmentRoot()
FILE: GVFS/GVFS.Common/GVFSEnlistment.cs
class GVFSEnlistment (line 12) | public partial class GVFSEnlistment : Enlistment
method GVFSEnlistment (line 23) | public GVFSEnlistment(string enlistmentRoot, string repoUrl, string gi...
method GVFSEnlistment (line 42) | private GVFSEnlistment(string enlistmentRoot, string gitBinPath, GitAu...
method GVFSEnlistment (line 52) | private GVFSEnlistment(string enlistmentRoot, string gitBinPath, GitAu...
method CreateFromDirectory (line 130) | public static GVFSEnlistment CreateFromDirectory(
method CreateForWorktree (line 192) | public static GVFSEnlistment CreateForWorktree(
method GetNewGVFSLogFileName (line 202) | public static string GetNewGVFSLogFileName(
method WaitUntilMounted (line 215) | public static bool WaitUntilMounted(ITracer tracer, string enlistmentR...
method WaitUntilMounted (line 221) | public static bool WaitUntilMounted(ITracer tracer, string pipeName, s...
method SetGitVersion (line 283) | public void SetGitVersion(string gitVersion)
method SetGVFSVersion (line 288) | public void SetGVFSVersion(string gvfsVersion)
method SetGVFSHooksVersion (line 293) | public void SetGVFSHooksVersion(string gvfsHooksVersion)
method InitializeCachePathsFromKey (line 298) | public void InitializeCachePathsFromKey(string localCacheRoot, string ...
method InitializeCachePaths (line 306) | public void InitializeCachePaths(string localCacheRoot, string gitObje...
method TryCreateEnlistmentSubFolders (line 314) | public bool TryCreateEnlistmentSubFolders()
method GetMountId (line 329) | public string GetMountId()
method GetEnlistmentId (line 334) | public string GetEnlistmentId()
method SetOnce (line 339) | private void SetOnce<T>(T value, ref T valueToSet)
method CreateHiddenDirectory (line 354) | private void CreateHiddenDirectory(string path)
method GetId (line 360) | private string GetId(string key)
FILE: GVFS/GVFS.Common/GVFSLock.Shared.cs
class GVFSLock (line 9) | public partial class GVFSLock
method TryAcquireGVFSLockForProcess (line 11) | public static bool TryAcquireGVFSLockForProcess(
method ReleaseGVFSLock (line 100) | public static void ReleaseGVFSLock(
method CheckAcceptResponse (line 143) | private static bool CheckAcceptResponse(NamedPipeMessages.AcquireLock....
FILE: GVFS/GVFS.Common/GVFSLock.cs
class GVFSLock (line 9) | public partial class GVFSLock
method GVFSLock (line 15) | public GVFSLock(ITracer tracer)
method TryAcquireLockForExternalRequestor (line 33) | public bool TryAcquireLockForExternalRequestor(
method TryAcquireLockForGVFS (line 84) | public bool TryAcquireLockForGVFS()
method ReleaseLockHeldByGVFS (line 115) | public void ReleaseLockHeldByGVFS()
method ReleaseLockHeldByExternalProcess (line 129) | public bool ReleaseLockHeldByExternalProcess(int pid)
method GetExternalHolder (line 134) | public NamedPipeMessages.LockData GetExternalHolder()
method IsLockAvailableForExternalRequestor (line 142) | public bool IsLockAvailableForExternalRequestor(out NamedPipeMessages....
method GetLockedGitCommand (line 147) | public string GetLockedGitCommand()
method GetStatus (line 162) | public string GetStatus()
method IsLockAvailable (line 181) | private bool IsLockAvailable(bool checkExternalHolderOnly, out NamedPi...
method ReleaseExternalLock (line 207) | private bool ReleaseExternalLock(int pid, string eventName)
method ReleaseLockForTerminatedProcess (line 254) | private void ReleaseLockForTerminatedProcess(int pid)
class ActiveGitCommandStats (line 261) | public class ActiveGitCommandStats
method ActiveGitCommandStats (line 286) | public ActiveGitCommandStats()
method RecordReleaseExternalLockRequested (line 291) | public void RecordReleaseExternalLockRequested()
method RecordUpdatePlaceholders (line 296) | public void RecordUpdatePlaceholders(
method RecordProjectionWriteLockHeld (line 316) | public void RecordProjectionWriteLockHeld(long durationMs)
method RecordParseGitIndex (line 321) | public void RecordParseGitIndex(long durationMs)
method RecordObjectDownload (line 326) | public void RecordObjectDownload(bool isBlob, long downloadTimeMs)
method RecordSizeQuery (line 340) | public void RecordSizeQuery(long queryTimeMs)
method AddStatsToTelemetry (line 346) | public void AddStatsToTelemetry(EventMetadata metadata)
class LockHolder (line 383) | private class LockHolder
method AcquireForGVFS (line 397) | public void AcquireForGVFS()
method AcquireForExternalRequestor (line 407) | public void AcquireForExternalRequestor(NamedPipeMessages.LockData e...
method Release (line 418) | public void Release()
method GetExternalHolder (line 424) | public NamedPipeMessages.LockData GetExternalHolder()
method GetExternalHolder (line 429) | public NamedPipeMessages.LockData GetExternalHolder(out bool externa...
FILE: GVFS/GVFS.Common/GVFSPlatform.cs
class GVFSPlatform (line 12) | public abstract class GVFSPlatform
method GVFSPlatform (line 14) | public GVFSPlatform(UnderConstructionFlags underConstruction)
method Register (line 37) | public static void Register(GVFSPlatform platform)
method StartBackgroundVFS4GProcess (line 54) | public abstract void StartBackgroundVFS4GProcess(ITracer tracer, strin...
method PrepareProcessToRunInBackground (line 65) | public abstract void PrepareProcessToRunInBackground();
method IsProcessActive (line 67) | public abstract bool IsProcessActive(int processId);
method IsServiceInstalledAndRunning (line 68) | public abstract void IsServiceInstalledAndRunning(string name, out boo...
method GetNamedPipeName (line 69) | public abstract string GetNamedPipeName(string enlistmentRoot);
method GetGVFSServiceNamedPipeName (line 70) | public abstract string GetGVFSServiceNamedPipeName(string serviceName);
method CreatePipeByName (line 71) | public abstract NamedPipeServerStream CreatePipeByName(string pipeName);
method GetOSVersionInformation (line 73) | public abstract string GetOSVersionInformation();
method GetSecureDataRootForGVFS (line 74) | public abstract string GetSecureDataRootForGVFS();
method GetSecureDataRootForGVFSComponent (line 75) | public abstract string GetSecureDataRootForGVFSComponent(string compon...
method GetCommonAppDataRootForGVFS (line 76) | public abstract string GetCommonAppDataRootForGVFS();
method GetLogsDirectoryForGVFSComponent (line 77) | public abstract string GetLogsDirectoryForGVFSComponent(string compone...
method IsElevated (line 78) | public abstract bool IsElevated();
method GetCurrentUser (line 79) | public abstract string GetCurrentUser();
method GetUserIdFromLoginSessionId (line 80) | public abstract string GetUserIdFromLoginSessionId(int sessionId, ITra...
method GetSystemInstallerLogPath (line 81) | public abstract string GetSystemInstallerLogPath();
method ConfigureVisualStudio (line 83) | public abstract void ConfigureVisualStudio(string gitBinPath, ITracer ...
method TryCopyPanicLogs (line 85) | public abstract bool TryCopyPanicLogs(string copyToDir, out string err...
method TryGetGVFSHooksVersion (line 87) | public abstract bool TryGetGVFSHooksVersion(out string hooksVersion, o...
method TryInstallGitCommandHooks (line 88) | public abstract bool TryInstallGitCommandHooks(GVFSContext context, st...
method GetPhysicalDiskInfo (line 90) | public abstract Dictionary<string, string> GetPhysicalDiskInfo(string ...
method IsConsoleOutputRedirectedToFile (line 92) | public abstract bool IsConsoleOutputRedirectedToFile();
method TryKillProcessTree (line 94) | public abstract bool TryKillProcessTree(int processId, out int exitCod...
method TryGetGVFSEnlistmentRoot (line 96) | public abstract bool TryGetGVFSEnlistmentRoot(string directory, out st...
method TryGetDefaultLocalCacheRoot (line 97) | public abstract bool TryGetDefaultLocalCacheRoot(string enlistmentRoot...
method IsGitStatusCacheSupported (line 99) | public abstract bool IsGitStatusCacheSupported();
method CreateFileBasedLock (line 101) | public abstract FileBasedLock CreateFileBasedLock(
method TryGetNormalizedPathRoot (line 106) | public bool TryGetNormalizedPathRoot(string path, out string pathRoot,...
class GVFSPlatformConstants (line 121) | public abstract class GVFSPlatformConstants
class UnderConstructionFlags (line 207) | public class UnderConstructionFlags
method UnderConstructionFlags (line 209) | public UnderConstructionFlags(
FILE: GVFS/GVFS.Common/Git/DiffTreeResult.cs
class DiffTreeResult (line 8) | public class DiffTreeResult
type Operations (line 19) | public enum Operations
method ParseFromDiffTreeLine (line 41) | public static DiffTreeResult ParseFromDiffTreeLine(string line)
method ParseFromLsTreeLine (line 129) | public static DiffTreeResult ParseFromLsTreeLine(string line)
method IsLsTreeLineOfType (line 176) | public static bool IsLsTreeLineOfType(string line, string typeMarker)
method AppendPathSeparatorIfNeeded (line 186) | private static string AppendPathSeparatorIfNeeded(string path)
method ParseOperation (line 191) | private static Operations ParseOperation(string gitOperationString)
method ConvertPathToUtf8Path (line 215) | private static string ConvertPathToUtf8Path(string relativePath)
FILE: GVFS/GVFS.Common/Git/EndianHelper.cs
class EndianHelper (line 3) | public static class EndianHelper
method Swap (line 5) | public static short Swap(short source)
method Swap (line 10) | public static int Swap(int source)
method Swap (line 15) | public static long Swap(long source)
method Swap (line 20) | public static ushort Swap(ushort source)
method Swap (line 26) | public static uint Swap(uint source)
method Swap (line 35) | public static ulong Swap(ulong source)
FILE: GVFS/GVFS.Common/Git/GVFSGitObjects.cs
class GVFSGitObjects (line 12) | public class GVFSGitObjects : GitObjects
method GVFSGitObjects (line 19) | public GVFSGitObjects(GVFSContext context, GitObjectsHttpRequestor obj...
type RequestSource (line 27) | public enum RequestSource
method TryCopyBlobContentStream (line 38) | public virtual bool TryCopyBlobContentStream(
method TryDownloadAndSaveObject (line 95) | public DownloadAndSaveObjectResult TryDownloadAndSaveObject(string obj...
method TryGetBlobSizeLocally (line 100) | public bool TryGetBlobSizeLocally(string sha, out long length)
method GetFileSizes (line 105) | public List<GitObjectsHttpRequestor.GitObjectSize> GetFileSizes(IEnume...
method TryDownloadAndSaveObject (line 110) | private DownloadAndSaveObjectResult TryDownloadAndSaveObject(
method TryRemoveInflightDownload (line 168) | private bool TryRemoveInflightDownload(string objectId, Lazy<DownloadA...
method DoDownloadAndSaveObject (line 174) | private DownloadAndSaveObjectResult DoDownloadAndSaveObject(
FILE: GVFS/GVFS.Common/Git/GitAuthentication.cs
class GitAuthentication (line 12) | public class GitAuthentication
method GitAuthentication (line 28) | public GitAuthentication(GitProcess git, string repoUrl)
method ApproveCredentials (line 51) | public void ApproveCredentials(ITracer tracer, string credentialString)
method RejectCredentials (line 90) | public void RejectCredentials(ITracer tracer, string credentialString)
method TryGetCredentials (line 152) | public bool TryGetCredentials(ITracer tracer, out string credentialStr...
method TryInitialize (line 193) | public bool TryInitialize(ITracer tracer, Enlistment enlistment, out s...
method TryInitializeAndQueryGVFSConfig (line 214) | public bool TryInitializeAndQueryGVFSConfig(
method TryInitializeAndRequireAuth (line 277) | internal bool TryInitializeAndRequireAuth(ITracer tracer, out string e...
method ConfigureHttpClientHandlerSslIfNeeded (line 293) | public void ConfigureHttpClientHandlerSslIfNeeded(ITracer tracer, Http...
method TryParseCredentialString (line 312) | private static bool TryParseCredentialString(string credentialString, ...
method GetNextAuthAttemptTime (line 334) | private DateTime GetNextAuthAttemptTime()
method UpdateBackoff (line 345) | private void UpdateBackoff()
method TryCallGitCredential (line 351) | private bool TryCallGitCredential(ITracer tracer, out string errorMess...
FILE: GVFS/GVFS.Common/Git/GitConfigHelper.cs
class GitConfigHelper (line 9) | public static class GitConfigHelper
method TrySanitizeConfigFileLine (line 19) | public static bool TrySanitizeConfigFileLine(string fileLine, out stri...
method GetSettings (line 39) | public static Dictionary<string, GitConfigSetting> GetSettings(string[...
method ParseKeyValues (line 84) | public static Dictionary<string, GitConfigSetting> ParseKeyValues(IEnu...
method ParseKeyValues (line 134) | public static Dictionary<string, GitConfigSetting> ParseKeyValues(stri...
FILE: GVFS/GVFS.Common/Git/GitConfigSetting.cs
class GitConfigSetting (line 5) | public class GitConfigSetting
method GitConfigSetting (line 15) | public GitConfigSetting(string name, params string[] values)
method HasValue (line 24) | public bool HasValue(string value)
method Add (line 29) | public void Add(string value)
FILE: GVFS/GVFS.Common/Git/GitCoreGVFSFlags.cs
type GitCoreGVFSFlags (line 5) | [Flags]
FILE: GVFS/GVFS.Common/Git/GitIndexGenerator.cs
class GitIndexGenerator (line 11) | public class GitIndexGenerator
method GitIndexGenerator (line 50) | public GitIndexGenerator(ITracer tracer, Enlistment enlistment, bool s...
method CreateFromRef (line 83) | public void CreateFromRef(string refName, uint indexVersion, bool isFi...
method EnqueueEntriesFromLsTree (line 108) | private void EnqueueEntriesFromLsTree(string line)
method WriteAllEntries (line 117) | private void WriteAllEntries(uint version, bool isFinal)
method WriteEntry (line 154) | private void WriteEntry(BinaryWriter writer, uint version, string sha,...
method WriteReplaceLength (line 197) | private void WriteReplaceLength(BinaryWriter writer, uint value)
method AppendIndexSha (line 222) | private void AppendIndexSha()
method GetIndexHash (line 233) | private byte[] GetIndexHash()
method ReplaceExistingIndex (line 248) | private void ReplaceExistingIndex()
class LsTreeEntry (line 255) | private class LsTreeEntry
method LsTreeEntry (line 257) | public LsTreeEntry()
method ParseFromLsTreeLine (line 265) | public static LsTreeEntry ParseFromLsTreeLine(string line)
FILE: GVFS/GVFS.Common/Git/GitObjectContentType.cs
type GitObjectContentType (line 3) | public enum GitObjectContentType
FILE: GVFS/GVFS.Common/Git/GitObjects.cs
class GitObjects (line 21) | public abstract class GitObjects
method GitObjects (line 38) | public GitObjects(ITracer tracer, Enlistment enlistment, GitObjectsHtt...
type DownloadAndSaveObjectResult (line 47) | public enum DownloadAndSaveObjectResult
method IsLooseObjectsDirectory (line 54) | public static bool IsLooseObjectsDirectory(string value)
method TryDownloadCommit (line 59) | public virtual bool TryDownloadCommit(string commitSha)
method DeleteStaleTempPrefetchPackAndIdxs (line 88) | public virtual void DeleteStaleTempPrefetchPackAndIdxs()
method DeleteStaleIncompletePrefetchPackAndIdxs (line 110) | private void DeleteStaleIncompletePrefetchPackAndIdxs()
method DeleteTemporaryFiles (line 141) | public virtual void DeleteTemporaryFiles()
method TryDownloadPrefetchPacks (line 156) | public virtual bool TryDownloadPrefetchPacks(GitProcess gitProcess, lo...
method WriteLooseObject (line 220) | public virtual string WriteLooseObject(Stream responseStream, string s...
method WriteTempPackFile (line 284) | public virtual string WriteTempPackFile(Stream stream)
method TryWriteTempFile (line 304) | public virtual bool TryWriteTempFile(
method IndexTempPackFile (line 380) | public virtual GitProcess.Result IndexTempPackFile(string tempPackPath...
method IndexPackFile (line 422) | public virtual GitProcess.Result IndexPackFile(string packfilePath, Gi...
method ReadPackFileNames (line 496) | public virtual string[] ReadPackFileNames(string packFolderPath, strin...
method IsUsingCacheServer (line 519) | public virtual bool IsUsingCacheServer()
method GetRandomPackName (line 524) | private static string GetRandomPackName(string packRoot)
method CreateEventMetadata (line 530) | private static EventMetadata CreateEventMetadata(Exception e = null)
method GetIndexForPack (line 542) | private static string GetIndexForPack(string packNameOrPath)
method TryMovePackAndIdx (line 547) | private bool TryMovePackAndIdx(string sourcePackPath, string targetPac...
method TryFlushFileBuffers (line 586) | private bool TryFlushFileBuffers(string path, out Exception exception,...
method TryGetAttributes (line 634) | private bool TryGetAttributes(string path, out FileAttributes attribut...
method TrySetAttributes (line 655) | private bool TrySetAttributes(string path, FileAttributes attributes, ...
method OpenTempLooseObjectStream (line 676) | private Stream OpenTempLooseObjectStream(string path)
method GetLooseObjectDestination (line 687) | private LooseObjectToWrite GetLooseObjectDestination(string sha)
method DeserializePrefetchPacks (line 708) | private RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.Call...
method AddFinalizationTasks (line 852) | private Task AddFinalizationTasks(TempPrefetchPackAndIdx currentOperat...
method FinalizePackFileAsync (line 858) | private async Task FinalizePackFileAsync(TempPrefetchPackAndIdx curren...
method StartPackIndexAsync (line 883) | private Task StartPackIndexAsync(ITracer activity, string packTempPath)
method WaitForPacks (line 903) | private bool WaitForPacks(List<TempPrefetchPackAndIdx> tempPacks, ref ...
method TryBuildIndex (line 948) | private bool TryBuildIndex(
method CleanupTempFile (line 978) | private void CleanupTempFile(ITracer activity, string fullPath)
method FinalizeTempFile (line 989) | private void FinalizeTempFile(string sha, LooseObjectToWrite toWrite, ...
method ValidateTempFile (line 1032) | private void ValidateTempFile(string tempFilePath, string finalFilePath)
method TrySavePackOrLooseObject (line 1062) | private RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.Call...
method TryAddPackFile (line 1103) | private GitProcess.Result TryAddPackFile(Stream contents, bool unpackO...
type LooseObjectToWrite (line 1122) | private struct LooseObjectToWrite
method LooseObjectToWrite (line 1127) | public LooseObjectToWrite(string tempFile, string actualFile)
class TempPrefetchPackAndIdx (line 1134) | private class TempPrefetchPackAndIdx
method TempPrefetchPackAndIdx (line 1136) | public TempPrefetchPackAndIdx(
FILE: GVFS/GVFS.Common/Git/GitOid.cs
type GitOid (line 5) | [StructLayout(LayoutKind.Sequential)]
method ToString (line 12) | public override string ToString()
FILE: GVFS/GVFS.Common/Git/GitPathConverter.cs
class GitPathConverter (line 7) | public static class GitPathConverter
method ConvertPathOctetsToUtf8 (line 12) | public static string ConvertPathOctetsToUtf8(string filePath)
method AddOctetsAsUtf8 (line 49) | private static void AddOctetsAsUtf8(StringBuilder converted, List<byte...
FILE: GVFS/GVFS.Common/Git/GitProcess.cs
class GitProcess (line 13) | public class GitProcess : ICredentialStore
method GitProcess (line 39) | static GitProcess()
method GitProcess (line 64) | public GitProcess(Enlistment enlistment)
method GitProcess (line 69) | public GitProcess(string gitBinPath, string workingDirectoryRoot)
method Init (line 100) | public static Result Init(Enlistment enlistment)
method GetFromGlobalConfig (line 105) | public static ConfigResult GetFromGlobalConfig(string gitBinPath, stri...
method GetFromSystemConfig (line 112) | public static ConfigResult GetFromSystemConfig(string gitBinPath, stri...
method GetFromFileConfig (line 119) | public static ConfigResult GetFromFileConfig(string gitBinPath, string...
method TryGetVersion (line 126) | public static bool TryGetVersion(string gitBinPath, out GitVersion git...
method TryKillRunningProcess (line 150) | public bool TryKillRunningProcess(out string processName, out int exit...
method TryDeleteCredential (line 172) | public virtual bool TryDeleteCredential(ITracer tracer, string repoUrl...
method TryStoreCredential (line 207) | public virtual bool TryStoreCredential(ITracer tracer, string repoUrl,...
method TryGetCertificatePassword (line 240) | public virtual bool TryGetCertificatePassword(
method TryGetCredential (line 289) | public virtual bool TryGetCredential(
method IsValidRepo (line 336) | public bool IsValidRepo()
method RevParse (line 342) | public Result RevParse(string gitRef)
method GetCurrentBranchName (line 347) | public Result GetCurrentBranchName()
method DeleteFromLocalConfig (line 352) | public void DeleteFromLocalConfig(string settingName)
method SetInLocalConfig (line 357) | public Result SetInLocalConfig(string settingName, string value, bool ...
method AddInLocalConfig (line 366) | public Result AddInLocalConfig(string settingName, string value)
method SetInFileConfig (line 374) | public Result SetInFileConfig(string configFile, string settingName, s...
method TryGetConfigUrlMatch (line 384) | public bool TryGetConfigUrlMatch(string section, string repositoryUrl,...
method TryGetAllConfig (line 397) | public bool TryGetAllConfig(bool localOnly, out Dictionary<string, Git...
method GetFromConfig (line 421) | public virtual ConfigResult GetFromConfig(string settingName, bool for...
method GetFromLocalConfig (line 433) | public ConfigResult GetFromLocalConfig(string settingName)
method TryGetFromConfig (line 448) | public bool TryGetFromConfig(string settingName, bool forceOutsideEnli...
method GetOriginUrl (line 463) | public ConfigResult GetOriginUrl()
method DiffTree (line 470) | public Result DiffTree(string sourceTreeish, string targetTreeish, Act...
method CreateBranchWithUpstream (line 475) | public Result CreateBranchWithUpstream(string branchToCreate, string u...
method ForceCheckout (line 480) | public Result ForceCheckout(string target)
method Reset (line 485) | public Result Reset(string target, string paths)
method Status (line 490) | public Result Status(bool allowObjectDownloads, bool useStatusCache, b...
method StatusPorcelain (line 506) | public Result StatusPorcelain()
method DiffCachedNameStatus (line 526) | public Result DiffCachedNameStatus(string[] pathspecs = null, string p...
method CheckoutIndexForFiles (line 553) | public List<Result> CheckoutIndexForFiles(IEnumerable<string> paths)
method QuoteGitPath (line 593) | public static string QuoteGitPath(string path)
method SerializeStatus (line 644) | public Result SerializeStatus(bool allowObjectDownloads, string serial...
method UnpackObjects (line 654) | public Result UnpackObjects(Stream packFileStream)
method PackObjects (line 666) | public Result PackObjects(string filenamePrefix, string gitObjectsDire...
method WriteCommitGraph (line 687) | public Result WriteCommitGraph(string objectDir, List<string> packs)
method VerifyCommitGraph (line 707) | public Result VerifyCommitGraph(string objectDir)
method IndexPack (line 713) | public Result IndexPack(string packfilePath, string idxOutputPath)
method WriteMultiPackIndex (line 733) | public Result WriteMultiPackIndex(string objectDir)
method VerifyMultiPackIndex (line 739) | public Result VerifyMultiPackIndex(string objectDir)
method RemoteAdd (line 744) | public Result RemoteAdd(string remoteName, string url)
method CatFileGetType (line 749) | public Result CatFileGetType(string objectId)
method LsTree (line 754) | public Result LsTree(string treeish, Action<string> parseStdOutLine, b...
method LsFiles (line 762) | public Result LsFiles(Action<string> parseStdOutLine)
method SetUpstream (line 770) | public Result SetUpstream(string branchName, string upstream)
method UpdateBranchSymbolicRef (line 775) | public Result UpdateBranchSymbolicRef(string refToUpdate, string targe...
method UpdateBranchSha (line 780) | public Result UpdateBranchSha(string refToUpdate, string targetSha)
method ReadTree (line 793) | public Result ReadTree(string treeIsh)
method PrunePacked (line 798) | public Result PrunePacked(string gitObjectDirectory)
method MultiPackIndexExpire (line 807) | public Result MultiPackIndexExpire(string gitObjectDirectory)
method MultiPackIndexRepack (line 812) | public Result MultiPackIndexRepack(string gitObjectDirectory, string b...
method GetGitProcess (line 817) | public Process GetGitProcess(string command, string workingDirectory, ...
method InvokeGitImpl (line 884) | protected virtual Result InvokeGitImpl(
method GenerateCredentialVerbCommand (line 983) | private static string GenerateCredentialVerbCommand(string verb)
method ParseValue (line 988) | private static string ParseValue(string contents, string prefix)
method InvokeGitOutsideEnlistment (line 1013) | private Result InvokeGitOutsideEnlistment(string command)
method InvokeGitOutsideEnlistment (line 1018) | private Result InvokeGitOutsideEnlistment(
method InvokeGitInWorkingDirectoryRoot (line 1037) | private Result InvokeGitInWorkingDirectoryRoot(
method InvokeGitAgainstDotGitFolder (line 1057) | private Result InvokeGitAgainstDotGitFolder(string command, bool usePr...
method InvokeGitAgainstDotGitFolder (line 1062) | private Result InvokeGitAgainstDotGitFolder(
class Result (line 1084) | public class Result
method Result (line 1089) | public Result(string stdout, string stderr, int exitCode)
method StderrContainsErrors (line 1110) | public bool StderrContainsErrors()
class ConfigResult (line 1123) | public class ConfigResult
method ConfigResult (line 1128) | public ConfigResult(Result result, string configName)
method TryParseAsString (line 1134) | public bool TryParseAsString(out string value, out string error, str...
method TryParseAsInt (line 1153) | public bool TryParseAsInt(int defaultValue, int minValue, out int va...
FILE: GVFS/GVFS.Common/Git/GitRefs.cs
class GitRefs (line 7) | public class GitRefs
method GitRefs (line 19) | public GitRefs(IEnumerable<string> infoRefsResponse, string branch)
method GetTipCommitId (line 55) | public string GetTipCommitId(string branch)
method GetDefaultBranch (line 60) | public string GetDefaultBranch()
method HasBranch (line 87) | public bool HasBranch(string branch)
method GetBranchRefPairs (line 93) | public IEnumerable<KeyValuePair<string, string>> GetBranchRefPairs()
method ToPackedRefs (line 98) | public string ToPackedRefs()
FILE: GVFS/GVFS.Common/Git/GitRepo.cs
class GitRepo (line 11) | public class GitRepo : IDisposable
method GitRepo (line 20) | public GitRepo(ITracer tracer, Enlistment enlistment, PhysicalFileSyst...
method GitRepo (line 34) | protected GitRepo(ITracer tracer)
type LooseBlobState (line 39) | private enum LooseBlobState
method CloseActiveRepo (line 59) | public void CloseActiveRepo()
method OpenRepo (line 64) | public void OpenRepo()
method TryGetObjectType (line 69) | public bool TryGetObjectType(string sha, out Native.ObjectTypes? objec...
method TryCopyBlobContentStream (line 74) | public virtual bool TryCopyBlobContentStream(string blobSha, Action<St...
method CommitAndRootTreeExists (line 95) | public virtual bool CommitAndRootTreeExists(string commitSha, out stri...
method ObjectExists (line 104) | public virtual bool ObjectExists(string blobSha)
method TryGetBlobLength (line 116) | public virtual bool TryGetBlobLength(string blobSha, out long size)
method TryGetMissingSubTrees (line 127) | public virtual bool TryGetMissingSubTrees(string treeSha, out string[]...
method Dispose (line 136) | public void Dispose()
method ReadLooseObjectHeader (line 145) | private static bool ReadLooseObjectHeader(Stream input, out long size)
method GetLooseBlobStateAtPath (line 175) | private LooseBlobState GetLooseBlobStateAtPath(string blobPath, Action...
method GetLooseBlobState (line 256) | private LooseBlobState GetLooseBlobState(string blobSha, Action<Stream...
FILE: GVFS/GVFS.Common/Git/GitSsl.cs
class GitSsl (line 14) | public class GitSsl
method GitSsl (line 22) | public GitSsl(
method GitSsl (line 41) | private GitSsl(Func<SystemCertificateStore> createCertificateStore, Ce...
method GetCertificate (line 64) | public X509Certificate2 GetCertificate(ITracer tracer, GitProcess gitP...
method SetBoolSettingOrThrow (line 90) | private static bool SetBoolSettingOrThrow(IDictionary<string, GitConfi...
method LogWithAppropriateLevel (line 107) | private static void LogWithAppropriateLevel(ITracer tracer, EventMetad...
method GetSubjectNameLineForLogging (line 125) | private static string GetSubjectNameLineForLogging(IEnumerable<X509Cer...
method GetCertificatePassword (line 132) | private string GetCertificatePassword(ITracer tracer, GitProcess git)
method GetCertificateFromFile (line 142) | private X509Certificate2 GetCertificateFromFile(ITracer tracer, EventM...
method GetCertificateFromStore (line 184) | private X509Certificate2 GetCertificateFromStore(ITracer tracer, Event...
FILE: GVFS/GVFS.Common/Git/GitVersion.cs
class GitVersion (line 5) | public class GitVersion
method GitVersion (line 7) | public GitVersion(int major, int minor, int build, string platform = n...
method GitVersion (line 10) | public GitVersion(int major, int minor, int build, int? releaseCandida...
method TryParseGitVersionCommandResult (line 29) | public static bool TryParseGitVersionCommandResult(string input, out G...
method TryParseVersion (line 44) | public static bool TryParseVersion(string input, out GitVersion version)
method IsEqualTo (line 142) | public bool IsEqualTo(GitVersion other)
method IsLessThan (line 152) | public bool IsLessThan(GitVersion other)
method ToString (line 157) | public override string ToString()
method TryParseComponent (line 167) | private static bool TryParseComponent(string component, out int parsed...
method CompareVersionNumbers (line 182) | private int CompareVersionNumbers(GitVersion other)
FILE: GVFS/GVFS.Common/Git/HashingStream.cs
class HashingStream (line 7) | public class HashingStream : Stream
method HashingStream (line 16) | public HashingStream(Stream stream)
method Seek (line 61) | public override long Seek(long offset, SeekOrigin origin)
method SetLength (line 66) | public override void SetLength(long value)
method Close (line 71) | public override void Close()
method Read (line 88) | public override int Read(byte[] buffer, int offset, int count)
method Write (line 99) | public override void Write(byte[] buffer, int offset, int count)
method Flush (line 104) | public override void Flush()
method Dispose (line 109) | protected override void Dispose(bool disposing)
method FinishHash (line 128) | private void FinishHash()
FILE: GVFS/GVFS.Common/Git/ICredentialStore.cs
type ICredentialStore (line 5) | public interface ICredentialStore
method TryGetCredential (line 7) | bool TryGetCredential(ITracer tracer, string url, out string username,...
method TryStoreCredential (line 9) | bool TryStoreCredential(ITracer tracer, string url, string username, s...
method TryDeleteCredential (line 11) | bool TryDeleteCredential(ITracer tracer, string url, string username, ...
FILE: GVFS/GVFS.Common/Git/IGitInstallation.cs
type IGitInstallation (line 3) | public interface IGitInstallation
method GitExists (line 5) | bool GitExists(string gitBinPath);
method GetInstalledGitBinPath (line 6) | string GetInstalledGitBinPath();
FILE: GVFS/GVFS.Common/Git/LibGit2Exception.cs
class LibGit2Exception (line 9) | public class LibGit2Exception : Exception
method LibGit2Exception (line 11) | public LibGit2Exception(string message) : base(message)
method LibGit2Exception (line 15) | public LibGit2Exception(string message, Exception innerException) : ba...
FILE: GVFS/GVFS.Common/Git/LibGit2Repo.cs
class LibGit2Repo (line 9) | public class LibGit2Repo : IDisposable
method LibGit2Repo (line 15) | public LibGit2Repo(ITracer tracer, string repoPath)
method LibGit2Repo (line 39) | protected LibGit2Repo()
method GetObjectType (line 52) | public Native.ObjectTypes? GetObjectType(string sha)
method GetTreeSha (line 70) | public virtual string GetTreeSha(string commitish)
method CommitAndRootTreeExists (line 95) | public virtual bool CommitAndRootTreeExists(string commitish, out stri...
method ObjectExists (line 106) | public virtual bool ObjectExists(string sha)
method TryCopyBlob (line 118) | public virtual bool TryCopyBlob(string sha, Action<Stream, long> write...
method GetMissingSubTrees (line 163) | public virtual string[] GetMissingSubTrees(string treeSha)
method GetConfigString (line 202) | public virtual string GetConfigString(string name)
method GetConfigBool (line 230) | public virtual bool? GetConfigBool(string name)
method ForEachMultiVarConfig (line 258) | public void ForEachMultiVarConfig(string key, MultiVarConfigCallback c...
method ForEachMultiVarConfigInGlobalAndSystemConfig (line 274) | public static void ForEachMultiVarConfigInGlobalAndSystemConfig(string...
method ForEachMultiVarConfig (line 290) | private static void ForEachMultiVarConfig(IntPtr configHandle, string ...
method IsMissingSubtree (line 320) | private bool IsMissingSubtree(IntPtr treeHandle, uint i, out string en...
method Dispose (line 353) | public void Dispose()
method Dispose (line 359) | protected virtual void Dispose(bool disposing)
method NormalizePathForSafeDirectoryComparison (line 374) | internal static string NormalizePathForSafeDirectoryComparison(string ...
method GetSafeDirectoryConfigEntries (line 389) | protected virtual void GetSafeDirectoryConfigEntries(MultiVarConfigCal...
method TryOpenRepo (line 398) | protected virtual Native.ResultCode TryOpenRepo(string path, out IntPt...
method InitNative (line 403) | protected virtual void InitNative()
method ShutdownNative (line 408) | protected virtual void ShutdownNative()
method GetLastNativeError (line 413) | protected virtual string GetLastNativeError()
method CheckSafeDirectoryConfigForCaseSensitivityIssue (line 418) | protected bool CheckSafeDirectoryConfigForCaseSensitivityIssue(ITracer...
class Native (line 443) | public static class Native
type ResultCode (line 445) | public enum ResultCode : int
type ObjectTypes (line 454) | public enum ObjectTypes
method IntPtrToGitOid (line 461) | public static GitOid IntPtrToGitOid(IntPtr oidPtr)
method Init (line 466) | [DllImport(Git2NativeLibName, EntryPoint = "git_libgit2_init")]
method Shutdown (line 469) | [DllImport(Git2NativeLibName, EntryPoint = "git_libgit2_shutdown")]
method RevParseSingle (line 472) | [DllImport(Git2NativeLibName, EntryPoint = "git_revparse_single")]
method GetLastError (line 475) | public static string GetLastError()
method GetLastGitError (line 486) | [DllImport(Git2NativeLibName, EntryPoint = "giterr_last")]
type GitError (line 489) | [StructLayout(LayoutKind.Sequential)]
class Repo (line 498) | public static class Repo
method Open (line 500) | [DllImport(Git2NativeLibName, EntryPoint = "git_repository_open")]
method Free (line 503) | [DllImport(Git2NativeLibName, EntryPoint = "git_repository_free")]
class Config (line 507) | public static class Config
method GetConfig (line 509) | [DllImport(Git2NativeLibName, EntryPoint = "git_repository_config")]
method GetGlobalAndSystemConfig (line 512) | [DllImport(Git2NativeLibName, EntryPoint = "git_config_open_defaul...
method GetString (line 515) | [DllImport(Git2NativeLibName, EntryPoint = "git_config_get_string")]
method GetMultivarForeach (line 518) | [DllImport(Git2NativeLibName, EntryPoint = "git_config_get_multiva...
type GitConfigEntry (line 531) | [StructLayout(LayoutKind.Sequential)]
method GetValue (line 541) | public string GetValue()
method GetName (line 546) | public string GetName()
method MarshalUtf8String (line 551) | private static string MarshalUtf8String(IntPtr ptr)
method GetBool (line 570) | [DllImport(Git2NativeLibName, EntryPoint = "git_config_get_bool")]
method Free (line 573) | [DllImport(Git2NativeLibName, EntryPoint = "git_config_free")]
class Object (line 577) | public static class Object
method GetType (line 579) | [DllImport(Git2NativeLibName, EntryPoint = "git_object_type")]
method Free (line 582) | [DllImport(Git2NativeLibName, EntryPoint = "git_object_free")]
class Commit (line 586) | public static class Commit
method GetTreeId (line 589) | [DllImport(Git2NativeLibName, EntryPoint = "git_commit_tree_id")]
class Blob (line 593) | public static class Blob
method GetRawSize (line 595) | [DllImport(Git2NativeLibName, EntryPoint = "git_blob_rawsize")]
method GetRawContent (line 599) | [DllImport(Git2NativeLibName, EntryPoint = "git_blob_rawcontent")]
class Tree (line 603) | public static class Tree
method GetEntryCount (line 605) | [DllImport(Git2NativeLibName, EntryPoint = "git_tree_entrycount")]
method GetEntryByIndex (line 608) | [DllImport(Git2NativeLibName, EntryPoint = "git_tree_entry_byindex")]
method GetEntryId (line 611) | [DllImport(Git2NativeLibName, EntryPoint = "git_tree_entry_id")]
method GetEntryFileMode (line 616) | [DllImport(Git2NativeLibName, EntryPoint = "git_tree_entry_filemod...
FILE: GVFS/GVFS.Common/Git/LibGit2RepoInvoker.cs
class LibGit2RepoInvoker (line 7) | public class LibGit2RepoInvoker : IDisposable
method LibGit2RepoInvoker (line 16) | public LibGit2RepoInvoker(ITracer tracer, string repoPath)
method LibGit2RepoInvoker (line 21) | public LibGit2RepoInvoker(ITracer tracer, Func<LibGit2Repo> createRepo)
method Dispose (line 29) | public void Dispose()
method TryInvoke (line 40) | public bool TryInvoke<TResult>(Func<LibGit2Repo, TResult> function, ou...
method DisposeSharedRepo (line 67) | public void DisposeSharedRepo()
method InitializeSharedRepo (line 81) | public void InitializeSharedRepo()
method GetConfigBoolOrDefault (line 90) | public bool GetConfigBoolOrDefault(string key, bool defaultValue)
method GetSharedRepo (line 101) | private LibGit2Repo GetSharedRepo()
FILE: GVFS/GVFS.Common/Git/NoOpStream.cs
class NoOpStream (line 6) | public class NoOpStream : Stream
method Flush (line 18) | public override void Flush()
method Read (line 22) | public override int Read(byte[] buffer, int offset, int count)
method Seek (line 27) | public override long Seek(long offset, SeekOrigin origin)
method SetLength (line 32) | public override void SetLength(long value)
method Write (line 37) | public override void Write(byte[] buffer, int offset, int count)
FILE: GVFS/GVFS.Common/Git/RefLogEntry.cs
class RefLogEntry (line 3) | public class RefLogEntry
method RefLogEntry (line 5) | public RefLogEntry(string sourceSha, string targetSha, string reason)
method TryParse (line 16) | public static bool TryParse(string line, out RefLogEntry entry)
FILE: GVFS/GVFS.Common/Git/RequiredGitConfig.cs
class RequiredGitConfig (line 11) | public static class RequiredGitConfig
method GetRequiredSettings (line 17) | public static Dictionary<string, string> GetRequiredSettings(Enlistmen...
FILE: GVFS/GVFS.Common/Git/Sha1Id.cs
method Sha1Id (line 23) | public Sha1Id(ulong shaBytes1Through8, ulong shaBytes9Through16, uint sh...
method Sha1Id (line 30) | public Sha1Id(string sha)
method TryParse (line 47) | public static bool TryParse(string sha, out Sha1Id sha1, out string error)
FILE: GVFS/GVFS.Common/Git/SideChannelStream.cs
class SideChannelStream (line 11) | public class SideChannelStream : Stream
method SideChannelStream (line 16) | public SideChannelStream(Stream from, Stream to)
method Flush (line 32) | public override void Flush()
method Read (line 38) | public override int Read(byte[] buffer, int offset, int count)
method Seek (line 45) | public override long Seek(long offset, SeekOrigin origin)
method SetLength (line 50) | public override void SetLength(long value)
method Write (line 55) | public override void Write(byte[] buffer, int offset, int count)
FILE: GVFS/GVFS.Common/GitCommandLineParser.cs
class GitCommandLineParser (line 6) | public class GitCommandLineParser
method GitCommandLineParser (line 15) | public GitCommandLineParser(string command)
type Verbs (line 33) | [Flags]
method IsResetMixed (line 53) | public bool IsResetMixed()
method IsResetSoftOrMixed (line 60) | public bool IsResetSoftOrMixed()
method IsSerializedStatus (line 69) | public bool IsSerializedStatus()
method IsCheckoutWithFilePaths (line 80) | public bool IsCheckoutWithFilePaths()
method IsVerb (line 118) | public bool IsVerb(Verbs verbs)
method StringToVerbs (line 128) | private Verbs StringToVerbs(string verb)
method HasArgument (line 146) | private bool HasArgument(string argument)
method HasArgumentPrefix (line 151) | private bool HasArgumentPrefix(string argument)
method HasArgumentAtIndex (line 156) | private bool HasArgumentAtIndex(string argument, int argumentIndex)
method HasAnyArgument (line 164) | private bool HasAnyArgument(Predicate<string> argumentPredicate)
method HasAnyArgument (line 170) | private bool HasAnyArgument(Predicate<string> argumentPredicate, out i...
FILE: GVFS/GVFS.Common/GitStatusCache.cs
class GitStatusCache (line 19) | public class GitStatusCache : IDisposable
method GitStatusCache (line 63) | public GitStatusCache(GVFSContext context, GitStatusCacheConfig config)
method GitStatusCache (line 68) | public GitStatusCache(GVFSContext context, TimeSpan backoffTime)
method SetProjectedFolderCountProvider (line 91) | public void SetProjectedFolderCountProvider(Func<int> provider)
method Initialize (line 96) | public virtual void Initialize()
method Shutdown (line 103) | public virtual void Shutdown()
method Invalidate (line 120) | public virtual void Invalidate()
method IsCacheReadyAndUpToDate (line 126) | public virtual bool IsCacheReadyAndUpToDate()
method RefreshAsynchronously (line 131) | public virtual void RefreshAsynchronously()
method RefreshAndWait (line 136) | public void RefreshAndWait()
method GetCachedHydrationSummary (line 145) | public EnlistmentHydrationSummary GetCachedHydrationSummary()
method IsReadyForExternalAcquireLockRequests (line 156) | public virtual bool IsReadyForExternalAcquireLockRequests(
method Dispose (line 210) | public virtual void Dispose()
method WriteTelemetryandReset (line 247) | public virtual bool WriteTelemetryandReset(EventMetadata metadata)
method SerializeStatusMainThread (line 290) | private void SerializeStatusMainThread()
method RebuildStatusCacheIfNeeded (line 324) | private void RebuildStatusCacheIfNeeded(bool ignoreBackoff)
method UpdateHydrationSummary (line 416) | private void UpdateHydrationSummary()
method TryRebuildStatusCache (line 502) | private bool TryRebuildStatusCache()
method TryDeleteStatusCacheFile (line 598) | private bool TryDeleteStatusCacheFile()
method MoveCacheFileToFinalLocation (line 636) | private bool MoveCacheFileToFinalLocation(string tmpStatusFilePath)
class StatusStatistics (line 659) | private class StatusStatistics
method RecordBackgroundStatusScanRun (line 675) | public void RecordBackgroundStatusScanRun()
method RecordBackgroundStatusScanError (line 684) | public void RecordBackgroundStatusScanError()
method RecordCacheNotReady (line 693) | public void RecordCacheNotReady()
method RecordCacheReady (line 702) | public void RecordCacheReady()
method RecordBlockedRequest (line 712) | public void RecordBlockedRequest()
class CacheState (line 720) | private class CacheState
method CacheState (line 728) | private CacheState(string name)
method ToString (line 733) | public override string ToString()
FILE: GVFS/GVFS.Common/GitStatusCacheConfig.cs
class GitStatusCacheConfig (line 11) | public class GitStatusCacheConfig
method GitStatusCacheConfig (line 17) | public GitStatusCacheConfig(TimeSpan backOffTime)
method TryLoadFromGitConfig (line 26) | public static bool TryLoadFromGitConfig(ITracer tracer, Enlistment enl...
method TryLoadFromGitConfig (line 31) | public static bool TryLoadFromGitConfig(ITracer tracer, GitProcess git...
method TryLoadBackOffTime (line 70) | private static bool TryLoadBackOffTime(GitProcess git, out int backoff...
method TryGetFromGitConfig (line 83) | private static bool TryGetFromGitConfig(GitProcess git, string configN...
FILE: GVFS/GVFS.Common/HealthCalculator/EnlistmentHealthCalculator.cs
class EnlistmentHealthCalculator (line 12) | public class EnlistmentHealthCalculator
method EnlistmentHealthCalculator (line 18) | public EnlistmentHealthCalculator(EnlistmentPathData pathData)
method CalculateStatistics (line 23) | public EnlistmentHealthData CalculateStatistics(string parentDirectory)
method ParseTopDirectory (line 80) | private string ParseTopDirectory(string path)
method CategorizePaths (line 103) | private int CategorizePaths(IEnumerable<string> paths, Dictionary<stri...
method TrimDirectoryFromPath (line 136) | private string TrimDirectoryFromPath(string path, string directoryTarget)
method IncreaseDictionaryCounterByKey (line 141) | private void IncreaseDictionaryCounterByKey(Dictionary<string, int> co...
method CalculateHealthMetric (line 151) | private decimal CalculateHealthMetric(int hydratedFileCount, int total...
class SubDirectoryInfo (line 161) | public class SubDirectoryInfo
method SubDirectoryInfo (line 163) | public SubDirectoryInfo(string name, int hydratedFileCount, int tota...
FILE: GVFS/GVFS.Common/HealthCalculator/EnlistmentHealthData.cs
class EnlistmentHealthData (line 5) | public class EnlistmentHealthData
method EnlistmentHealthData (line 7) | public EnlistmentHealthData(
FILE: GVFS/GVFS.Common/HealthCalculator/EnlistmentHydrationSummary.cs
class EnlistmentHydrationSummary (line 10) | public class EnlistmentHydrationSummary
method ToMessage (line 37) | public string ToMessage()
method CreateSummary (line 49) | public static EnlistmentHydrationSummary CreateSummary(
method EmitDurationTelemetry (line 160) | private static void EmitDurationTelemetry(
method GetIndexFileCount (line 186) | internal static int GetIndexFileCount(GVFSEnlistment enlistment, Physi...
FILE: GVFS/GVFS.Common/HealthCalculator/EnlistmentPathData.cs
class EnlistmentPathData (line 13) | public class EnlistmentPathData
method EnlistmentPathData (line 23) | public EnlistmentPathData()
method NormalizeAllPaths (line 34) | public void NormalizeAllPaths()
method LoadPlaceholdersFromDatabase (line 52) | public void LoadPlaceholdersFromDatabase(GVFSEnlistment enlistment)
method LoadPathsFromGitIndex (line 71) | public void LoadPathsFromGitIndex(GVFSEnlistment enlistment)
method LoadModifiedPaths (line 98) | public void LoadModifiedPaths(GVFSEnlistment enlistment, ITracer tracer)
method ReadModifiedPathDatabaseLines (line 121) | private IEnumerable<string> ReadModifiedPathDatabaseLines(StreamReader r)
method TryLoadModifiedPathsFromPipe (line 146) | private bool TryLoadModifiedPathsFromPipe(GVFSEnlistment enlistment, I...
method AddModifiedPaths (line 181) | private void AddModifiedPaths(IEnumerable<string> modifiedPathsList)
method TrimGitIndexLineWithSkipWorktree (line 203) | private static string TrimGitIndexLineWithSkipWorktree(string line)
method NormalizePaths (line 208) | private void NormalizePaths(List<string> paths)
method TrimGitIndexLine (line 222) | private static string TrimGitIndexLine(string line)
FILE: GVFS/GVFS.Common/HealthCalculator/HydrationStatusCircuitBreaker.cs
class HydrationStatusCircuitBreaker (line 18) | public class HydrationStatusCircuitBreaker
method HydrationStatusCircuitBreaker (line 25) | public HydrationStatusCircuitBreaker(
method IsDisabled (line 39) | public bool IsDisabled()
method RecordFailure (line 78) | public void RecordFailure()
method TryParseMarkerFile (line 142) | internal static bool TryParseMarkerFile(string content, out string dat...
FILE: GVFS/GVFS.Common/HeartbeatThread.cs
class HeartbeatThread (line 7) | public class HeartbeatThread
method HeartbeatThread (line 18) | public HeartbeatThread(ITracer tracer, IHeartBeatMetadataProvider data...
method Start (line 24) | public void Start()
method Stop (line 35) | public void Stop()
method EmitHeartbeat (line 49) | private void EmitHeartbeat(object unusedState)
FILE: GVFS/GVFS.Common/Http/CacheServerInfo.cs
class CacheServerInfo (line 6) | public class CacheServerInfo
method CacheServerInfo (line 12) | [JsonConstructor]
method HasValidUrl (line 35) | public bool HasValidUrl()
method IsNone (line 40) | public bool IsNone(string repoUrl)
method ToString (line 46) | public override string ToString()
class ReservedNames (line 61) | public static class ReservedNames
FILE: GVFS/GVFS.Common/Http/CacheServerResolver.cs
class CacheServerResolver (line 8) | public class CacheServerResolver
method CacheServerResolver (line 13) | public CacheServerResolver(
method GetCacheServerFromConfig (line 21) | public static CacheServerInfo GetCacheServerFromConfig(Enlistment enli...
method GetUrlFromConfig (line 29) | public static string GetUrlFromConfig(Enlistment enlistment)
method TryResolveUrlFromRemote (line 40) | public bool TryResolveUrlFromRemote(
method ResolveNameFromRemote (line 75) | public CacheServerInfo ResolveNameFromRemote(
method ParseUrlOrFriendlyName (line 94) | public CacheServerInfo ParseUrlOrFriendlyName(string userInput)
method TrySaveUrlToLocalConfig (line 123) | public bool TrySaveUrlToLocalConfig(CacheServerInfo cache, out string ...
method GetValueFromConfig (line 132) | private static string GetValueFromConfig(GitProcess git, string config...
method GetDeprecatedCacheConfigSettingName (line 147) | private static string GetDeprecatedCacheConfigSettingName(Enlistment e...
method CreateNone (line 158) | private CacheServerInfo CreateNone()
method InputMatchesEnlistmentUrl (line 163) | private bool InputMatchesEnlistmentUrl(string userInput)
FILE: GVFS/GVFS.Common/Http/ConfigHttpRequestor.cs
class ConfigHttpRequestor (line 10) | public class ConfigHttpRequestor : HttpRequestor
method ConfigHttpRequestor (line 14) | public ConfigHttpRequestor(ITracer tracer, Enlistment enlistment, Retr...
method TryQueryGVFSConfig (line 20) | public bool TryQueryGVFSConfig(bool logErrors, out ServerGVFSConfig se...
FILE: GVFS/GVFS.Common/Http/GitEndPointResponseData.cs
class GitEndPointResponseData (line 10) | public class GitEndPointResponseData : IDisposable
method GitEndPointResponseData (line 18) | public GitEndPointResponseData(HttpStatusCode statusCode, Exception er...
method GitEndPointResponseData (line 30) | public GitEndPointResponseData(HttpStatusCode statusCode, string conte...
method RetryableReadToEnd (line 55) | public string RetryableReadToEnd()
method RetryableReadAllLines (line 84) | public List<string> RetryableReadAllLines()
method Dispose (line 115) | public void Dispose()
method Dispose (line 121) | public void Dispose(bool disposing)
method MapContentType (line 148) | private static GitObjectContentType MapContentType(string contentType)
FILE: GVFS/GVFS.Common/Http/GitObjectsHttpException.cs
class GitObjectsHttpException (line 6) | public class GitObjectsHttpException : Exception
method GitObjectsHttpException (line 8) | public GitObjectsHttpException(HttpStatusCode statusCode, string ex) :...
FILE: GVFS/GVFS.Common/Http/GitObjectsHttpRequestor.cs
class GitObjectsHttpRequestor (line 14) | public class GitObjectsHttpRequestor : HttpRequestor
method GitObjectsHttpRequestor (line 23) | public GitObjectsHttpRequestor(ITracer tracer, Enlistment enlistment, ...
method QueryForFileSizes (line 32) | public virtual List<GitObjectSize> QueryForFileSizes(IEnumerable<strin...
method QueryInfoRefs (line 92) | public virtual GitRefs QueryInfoRefs(string branch)
method TryDownloadLooseObject (line 132) | public virtual RetryWrapper<GitObjectTaskResult>.InvocationResult TryD...
method TryDownloadObjects (line 159) | public virtual RetryWrapper<GitObjectTaskResult>.InvocationResult TryD...
method TryDownloadObjects (line 179) | public virtual RetryWrapper<GitObjectTaskResult>.InvocationResult TryD...
method TrySendProtocolRequest (line 213) | public virtual RetryWrapper<GitObjectTaskResult>.InvocationResult TryS...
method TrySendProtocolRequest (line 236) | public virtual RetryWrapper<GitObjectTaskResult>.InvocationResult TryS...
method TrySendProtocolRequest (line 259) | public virtual RetryWrapper<GitObjectTaskResult>.InvocationResult TryS...
method ToJsonList (line 299) | private static string ToJsonList(IEnumerable<string> strings)
method CreateObjectIdJson (line 304) | private static string CreateObjectIdJson(IEnumerable<string> strings)
method HandleDownloadAndSaveObjectError (line 309) | private void HandleDownloadAndSaveObjectError(bool retryOnFailure, lon...
method ObjectIdsJsonGenerator (line 324) | private string ObjectIdsJsonGenerator(long requestId, Func<IEnumerable...
class GitObjectSize (line 344) | public class GitObjectSize
method GitObjectSize (line 349) | [JsonConstructor]
class GitObjectTaskResult (line 357) | public class GitObjectTaskResult
method GitObjectTaskResult (line 359) | public GitObjectTaskResult(bool success)
method GitObjectTaskResult (line 364) | public GitObjectTaskResult(HttpStatusCode statusCode)
FILE: GVFS/GVFS.Common/Http/HttpRequestor.cs
class HttpRequestor (line 18) | public abstract class HttpRequestor : IDisposable
method HttpRequestor (line 33) | static HttpRequestor()
method HttpRequestor (line 50) | protected HttpRequestor(ITracer tracer, RetryConfig retryConfig, Enlis...
method GetNewRequestId (line 81) | public static long GetNewRequestId()
method Dispose (line 86) | public void Dispose()
method SendRequest (line 95) | protected GitEndPointResponseData SendRequest(
method ShouldRetry (line 308) | private static bool ShouldRetry(HttpStatusCode statusCode)
method GetSingleHeaderOrEmpty (line 323) | private static string GetSingleHeaderOrEmpty(HttpHeaders headers, stri...
method TryGetResponseMessageFromHttpRequestException (line 337) | private static bool TryGetResponseMessageFromHttpRequestException(Http...
method TryApplyConnectionLimitFromConfig (line 377) | private static void TryApplyConnectionLimitFromConfig(ITracer tracer, ...
method GetMachineConfigLock (line 429) | private static FileStream GetMachineConfigLock()
FILE: GVFS/GVFS.Common/IDiskLayoutUpgradeData.cs
type IDiskLayoutUpgradeData (line 6) | public interface IDiskLayoutUpgradeData
method TryParseLegacyDiskLayoutVersion (line 10) | bool TryParseLegacyDiskLayoutVersion(string dotGVFSPath, out int major...
FILE: GVFS/GVFS.Common/IHeartBeatMetadataProvider.cs
type IHeartBeatMetadataProvider (line 5) | public interface IHeartBeatMetadataProvider
method GetAndResetHeartBeatMetadata (line 7) | EventMetadata GetAndResetHeartBeatMetadata(out bool logToFile);
FILE: GVFS/GVFS.Common/IProcessRunner.cs
type IProcessRunner (line 8) | public interface IProcessRunner
method Run (line 10) | ProcessResult Run(string programName, string args, bool redirectOutput);
FILE: GVFS/GVFS.Common/InternalVerbParameters.cs
class InternalVerbParameters (line 5) | public class InternalVerbParameters
method InternalVerbParameters (line 7) | public InternalVerbParameters(
method FromJson (line 24) | public static InternalVerbParameters FromJson(string json)
method ToJson (line 29) | public string ToJson()
FILE: GVFS/GVFS.Common/InvalidRepoException.cs
class InvalidRepoException (line 5) | public class InvalidRepoException : Exception
method InvalidRepoException (line 7) | public InvalidRepoException(string message)
FILE: GVFS/GVFS.Common/LegacyPlaceholderListDatabase.cs
class LegacyPlaceholderListDatabase (line 10) | public class LegacyPlaceholderListDatabase : FileBasedCollection, IPlace...
method LegacyPlaceholderListDatabase (line 46) | private LegacyPlaceholderListDatabase(ITracer tracer, PhysicalFileSyst...
method TryCreate (line 51) | public static bool TryCreate(ITracer tracer, string dataFilePath, Phys...
method GetCount (line 76) | public int GetCount()
method AddFile (line 81) | public void AddFile(string path, string sha)
method AddPartialFolder (line 86) | public void AddPartialFolder(string path, string sha)
method AddExpandedFolder (line 91) | public void AddExpandedFolder(string path)
method AddPossibleTombstoneFolder (line 96) | public void AddPossibleTombstoneFolder(string path)
method Remove (line 101) | public void Remove(string path)
method GetAllEntries (line 134) | public List<IPlaceholderData> GetAllEntries()
method GetAllEntries (line 179) | public void GetAllEntries(out List<IPlaceholderData> filePlaceholders,...
method GetAllFilePaths (line 224) | public HashSet<string> GetAllFilePaths()
method GetFilePlaceholdersCount (line 254) | public int GetFilePlaceholdersCount()
method GetFolderPlaceholdersCount (line 259) | public int GetFolderPlaceholdersCount()
method WriteAllEntriesAndFlush (line 264) | public void WriteAllEntriesAndFlush(IEnumerable<IPlaceholderData> upda...
method RemoveAllEntriesForFolder (line 276) | List<IPlaceholderData> IPlaceholderCollection.RemoveAllEntriesForFolde...
method AddPlaceholderData (line 281) | public void AddPlaceholderData(IPlaceholderData data)
method GenerateDataLines (line 286) | private IEnumerable<string> GenerateDataLines(IEnumerable<IPlaceholder...
method AddAndFlush (line 328) | private void AddAndFlush(string path, string sha)
method TryParseAddLine (line 349) | private bool TryParseAddLine(string line, out string key, out string v...
method TryParseRemoveLine (line 376) | private bool TryParseRemoveLine(string line, out string key, out strin...
class PlaceholderData (line 384) | public class PlaceholderData : IPlaceholderData
method PlaceholderData (line 386) | public PlaceholderData(string path, string fileShaOrFolderValue)
method IsShaAFolder (line 419) | public static bool IsShaAFolder(string shaValue)
class PlaceholderDataEntry (line 427) | private class PlaceholderDataEntry
method PlaceholderDataEntry (line 429) | public PlaceholderDataEntry(string path, string sha)
method PlaceholderDataEntry (line 436) | public PlaceholderDataEntry(string path)
FILE: GVFS/GVFS.Common/LocalCacheResolver.cs
class LocalCacheResolver (line 11) | public class LocalCacheResolver
method LocalCacheResolver (line 21) | public LocalCacheResolver(GVFSEnlistment enlistment, PhysicalFileSyste...
method TryGetDefaultLocalCacheRoot (line 27) | public static bool TryGetDefaultLocalCacheRoot(GVFSEnlistment enlistme...
method TryGetLocalCacheKeyFromLocalConfigOrRemoteCacheServers (line 39) | public bool TryGetLocalCacheKeyFromLocalConfigOrRemoteCacheServers(
method CreateEventMetadata (line 154) | private static EventMetadata CreateEventMetadata(Exception e = null)
method TryOpenMappingFile (line 166) | private bool TryOpenMappingFile(ITracer tracer, string localCacheRoot,...
method TryGetLocalCacheKeyFromRemoteCacheServers (line 193) | private bool TryGetLocalCacheKeyFromRemoteCacheServers(
method TryAcquireLockWithRetries (line 273) | private bool TryAcquireLockWithRetries(ITracer tracer, FileBasedLock m...
method ToMappingKey (line 298) | private string ToMappingKey(string url)
method TryFindExistingLocalCacheKey (line 303) | private bool TryFindExistingLocalCacheKey(FileBasedDictionary<string, ...
FILE: GVFS/GVFS.Common/LocalGVFSConfig.cs
class LocalGVFSConfig (line 7) | public class LocalGVFSConfig
method LocalGVFSConfig (line 14) | public LocalGVFSConfig()
method TryGetAllConfig (line 20) | public virtual bool TryGetAllConfig(out Dictionary<string, string> all...
method TryGetConfig (line 43) | public virtual bool TryGetConfig(
method TrySetConfig (line 69) | public virtual bool TrySetConfig(
method TryRemoveConfig (line 85) | public virtual bool TryRemoveConfig(string name, out string error)
method TryPerformAction (line 98) | private bool TryPerformAction(Action action, out string error)
method TryLoadSettings (line 120) | private bool TryLoadSettings(out string error)
FILE: GVFS/GVFS.Common/Maintenance/GitMaintenanceQueue.cs
class GitMaintenanceQueue (line 9) | public class GitMaintenanceQueue
method GitMaintenanceQueue (line 16) | public GitMaintenanceQueue(GVFSContext context)
method TryEnqueue (line 25) | public bool TryEnqueue(GitMaintenanceStep step)
method Stop (line 48) | public void Stop()
method EnlistmentRootReady (line 61) | public bool EnlistmentRootReady()
method RunQueue (line 66) | private void RunQueue()
method LogError (line 101) | private void LogError(string area, string methodName, Exception except...
method LogErrorAndExit (line 114) | private void LogErrorAndExit(string area, string methodName, Exception...
FILE: GVFS/GVFS.Common/Maintenance/GitMaintenanceScheduler.cs
class GitMaintenanceScheduler (line 8) | public class GitMaintenanceScheduler : IDisposable
method GitMaintenanceScheduler (line 23) | public GitMaintenanceScheduler(GVFSContext context, GitObjects gitObje...
method EnqueueOneTimeStep (line 33) | public void EnqueueOneTimeStep(GitMaintenanceStep step)
method Dispose (line 38) | public void Dispose()
method ScheduleRecurringSteps (line 50) | private void ScheduleRecurringSteps()
FILE: GVFS/GVFS.Common/Maintenance/GitMaintenanceStep.cs
class GitMaintenanceStep (line 10) | public abstract class GitMaintenanceStep
method GitMaintenanceStep (line 15) | public GitMaintenanceStep(GVFSContext context, bool requireObjectCache...
method EnlistmentRootReady (line 31) | public static bool EnlistmentRootReady(GVFSContext context)
method EnlistmentRootReady (line 47) | public bool EnlistmentRootReady()
method Execute (line 52) | public void Execute()
method Stop (line 104) | public void Stop()
method GetPackFilesInfo (line 143) | public void GetPackFilesInfo(out int count, out long size, out bool ha...
method PerformMaintenance (line 170) | protected abstract void PerformMaintenance();
method RunGitCommand (line 172) | protected GitProcess.Result RunGitCommand(Func<GitProcess, GitProcess....
method CreateEventMetadata (line 215) | protected EventMetadata CreateEventMetadata(Exception e = null)
method EnoughTimeBetweenRuns (line 228) | protected bool EnoughTimeBetweenRuns()
method SaveLastRunTimeToFile (line 250) | protected void SaveLastRunTimeToFile()
method LogErrorAndRewriteMultiPackIndex (line 261) | protected void LogErrorAndRewriteMultiPackIndex(ITracer activity)
method LogErrorAndRewriteCommitGraph (line 273) | protected void LogErrorAndRewriteCommitGraph(ITracer activity, List<st...
method CreateProcessAndRun (line 293) | private void CreateProcessAndRun()
class StoppingException (line 316) | protected class StoppingException : Exception
FILE: GVFS/GVFS.Common/Maintenance/GitProcessChecker.cs
class GitProcessChecker (line 8) | public class GitProcessChecker
method GetRunningGitProcessIds (line 10) | public virtual IEnumerable<int> GetRunningGitProcessIds()
FILE: GVFS/GVFS.Common/Maintenance/LooseObjectsStep.cs
class LooseObjectsStep (line 14) | public class LooseObjectsStep : GitMaintenanceStep
method LooseObjectsStep (line 19) | public LooseObjectsStep(
type CreatePackResult (line 29) | public enum CreatePackResult
method CountLooseObjects (line 44) | public void CountLooseObjects(out int count, out long size)
method GetBatchOfLooseObjects (line 62) | public IEnumerable<string> GetBatchOfLooseObjects(int batchSize)
method WriteLooseObjectIds (line 101) | public int WriteLooseObjectIds(StreamWriter streamWriter)
method TryGetLooseObjectId (line 114) | public bool TryGetLooseObjectId(string directoryName, string filePath,...
method TryCreateLooseObjectsPackFile (line 129) | public CreatePackResult TryCreateLooseObjectsPackFile(out int objectsA...
method GetLooseObjectFileName (line 158) | public string GetLooseObjectFileName(string objectId)
method ClearCorruptLooseObjects (line 166) | public void ClearCorruptLooseObjects(EventMetadata metadata)
method PerformMaintenance (line 194) | protected override void PerformMaintenance()
FILE: GVFS/GVFS.Common/Maintenance/PackfileMaintenanceStep.cs
class PackfileMaintenanceStep (line 27) | public class PackfileMaintenanceStep : GitMaintenanceStep
method PackfileMaintenanceStep (line 35) | public PackfileMaintenanceStep(
method CleanStaleIdxFiles (line 52) | public List<string> CleanStaleIdxFiles(out int numDeletionBlocked)
method PerformMaintenance (line 90) | protected override void PerformMaintenance()
FILE: GVFS/GVFS.Common/Maintenance/PostFetchStep.cs
class PostFetchStep (line 10) | public class PostFetchStep : GitMaintenanceStep
method PostFetchStep (line 15) | public PostFetchStep(GVFSContext context, List<string> packIndexes, bo...
method PerformMaintenance (line 23) | protected override void PerformMaintenance()
FILE: GVFS/GVFS.Common/Maintenance/PrefetchStep.cs
class PrefetchStep (line 13) | public class PrefetchStep : GitMaintenanceStep
method PrefetchStep (line 22) | public PrefetchStep(GVFSContext context, GitObjects gitObjects, bool r...
method TryPrefetchCommitsAndTrees (line 32) | public bool TryPrefetchCommitsAndTrees(out string error, GitProcess gi...
method PerformMaintenance (line 75) | protected override void PerformMaintenance()
method GetTimestamp (line 124) | private static long? GetTimestamp(string packName)
method WaitUntilLockIsAcquired (line 142) | private static void WaitUntilLockIsAcquired(ITracer tracer, FileBasedL...
method TryGetMaxGoodPrefetchTimestamp (line 157) | private bool TryGetMaxGoodPrefetchTimestamp(out long maxGoodTimestamp,...
method SchedulePostFetchJob (line 279) | private void SchedulePostFetchJob(List<string> packIndexes)
method UpdateKeepPacks (line 332) | private void UpdateKeepPacks()
class PrefetchPackInfo (line 374) | private class PrefetchPackInfo
method PrefetchPackInfo (line 376) | public PrefetchPackInfo(long timestamp, string path)
FILE: GVFS/GVFS.Common/MissingTreeTracker.cs
class MissingTreeTracker (line 13) | public class MissingTreeTracker
method MissingTreeTracker (line 31) | public MissingTreeTracker(ITracer tracer, int treeCapacity)
method AddMissingRootTree (line 45) | public void AddMissingRootTree(string treeSha, string commitSha)
method AddMissingSubTrees (line 58) | public void AddMissingSubTrees(string parentTreeSha, string[] subTreeS...
method TryGetCommits (line 90) | public bool TryGetCommits(string treeSha, out string[] commitShas)
method GetHighestMissingTreeCount (line 113) | public int GetHighestMissingTreeCount(string[] commitShas, out string ...
method MarkCommitComplete (line 140) | public void MarkCommitComplete(string commitSha)
method EnsureCommitTracked (line 155) | private void EnsureCommitTracked(string commitSha)
method AddTreeToCommit (line 169) | private void AddTreeToCommit(string treeSha, string commitSha)
method MarkCommitAsUsed (line 190) | private void MarkCommitAsUsed(string commitSha)
method EvictLruCommit (line 200) | private bool EvictLruCommit()
method RemoveCommitNoCache (line 233) | private void RemoveCommitNoCache(string commitSha)
method RemoveCommitWithCascade (line 261) | private void RemoveCommitWithCascade(string commitSha)
method RemoveFromLruOrder (line 309) | private void RemoveFromLruOrder(string commitSha)
FILE: GVFS/GVFS.Common/ModifiedPathsDatabase.cs
class ModifiedPathsDatabase (line 14) | public class ModifiedPathsDatabase : FileBasedCollection
method ModifiedPathsDatabase (line 18) | protected ModifiedPathsDatabase(ITracer tracer, PhysicalFileSystem fil...
method TryLoadOrCreate (line 29) | public static bool TryLoadOrCreate(ITracer tracer, string dataDirector...
method RemoveEntriesWithParentFolderEntry (line 60) | public void RemoveEntriesWithParentFolderEntry(ITracer tracer)
method Contains (line 80) | public bool Contains(string path, bool isFolder)
method ContainsParentFolder (line 86) | public bool ContainsParentFolder(string path, out string parentFolder)
method GetAllModifiedPaths (line 92) | public IEnumerable<string> GetAllModifiedPaths()
method TryAdd (line 97) | public bool TryAdd(string path, bool isFolder, out bool isRetryable)
method RemoveAllEntriesForFolder (line 123) | public List<string> RemoveAllEntriesForFolder(string path)
method TryRemove (line 142) | public bool TryRemove(string path, bool isFolder, out bool isRetryable)
method WriteAllEntriesAndFlush (line 169) | public void WriteAllEntriesAndFlush()
method CreateEventMetadata (line 181) | private static EventMetadata CreateEventMetadata(bool isFolder, string...
method GenerateDataLines (line 195) | private IEnumerable<string> GenerateDataLines()
method TraceWarning (line 203) | private void TraceWarning(bool isFolder, string entry, Exception e, st...
method TraceError (line 212) | private void TraceError(bool isFolder, string entry, Exception e, stri...
method TryParseAddLine (line 221) | private bool TryParseAddLine(string line, out string key, out string v...
method TryParseRemoveLine (line 229) | private bool TryParseRemoveLine(string line, out string key, out strin...
method ContainsParentFolderWithNormalizedPath (line 236) | private bool ContainsParentFolderWithNormalizedPath(string modifiedPath)
method ContainsParentFolderWithNormalizedPath (line 241) | private bool ContainsParentFolderWithNormalizedPath(string modifiedPat...
method NormalizeEntryString (line 257) | private string NormalizeEntryString(string virtualPath, bool isFolder)
FILE: GVFS/GVFS.Common/NamedPipes/AllowAllLocksNamedPipeServer.cs
class AllowAllLocksNamedPipeServer (line 5) | public class AllowAllLocksNamedPipeServer
method Create (line 7) | public static NamedPipeServer Create(ITracer tracer, GVFSEnlistment en...
method HandleRequest (line 12) | private static void HandleRequest(ITracer tracer, string request, Name...
FILE: GVFS/GVFS.Common/NamedPipes/BrokenPipeException.cs
class BrokenPipeException (line 6) | public class BrokenPipeException : Exception
method BrokenPipeException (line 8) | public BrokenPipeException(string message, IOException innerException)
FILE: GVFS/GVFS.Common/NamedPipes/HydrationStatusNamedPipeMessages.cs
class NamedPipeMessages (line 5) | public static partial class NamedPipeMessages
class HydrationStatus (line 7) | public static class HydrationStatus
class Response (line 16) | public class Response
method ToDisplayMessage (line 36) | public string ToDisplayMessage()
method ToBody (line 48) | public string ToBody()
method TryParse (line 59) | public static bool TryParse(string body, out Response response)
FILE: GVFS/GVFS.Common/NamedPipes/LockNamedPipeMessages.cs
class NamedPipeMessages (line 13) | public static partial class NamedPipeMessages
class AcquireLock (line 19) | public static class AcquireLock
class Response (line 29) | public class Response
method Response (line 31) | public Response(string result, LockData responseData = null, strin...
method Response (line 38) | public Response(Message message)
method CreateMessage (line 58) | public Message CreateMessage()
class ReleaseLock (line 75) | public static class ReleaseLock
class Response (line 81) | public class Response
method Response (line 83) | public Response(string result, ReleaseLockData responseData = null)
method Response (line 89) | public Response(Message message)
method CreateMessage (line 99) | public Message CreateMessage()
class ReleaseLockData (line 111) | public class ReleaseLockData
method ReleaseLockData (line 124) | public ReleaseLockData(List<string> failedToUpdateFileList, List<s...
method ReleaseLockData (line 133) | private ReleaseLockData(
method FromBody (line 174) | internal static ReleaseLockData FromBody(string body)
method ToMessage (line 217) | internal string ToMessage()
class LockRequest (line 231) | public class LockRequest
method LockRequest (line 233) | public LockRequest(string messageBody)
method LockRequest (line 238) | public LockRequest(int pid, bool isElevated, bool checkAvailabilityO...
method CreateMessage (line 245) | public Message CreateMessage(string header)
class LockData (line 251) | public class LockData
method LockData (line 253) | public LockData(int pid, bool isElevated, bool checkAvailabilityOnly...
method ToString (line 280) | public override string ToString()
method FromBody (line 285) | internal static LockData FromBody(string body)
method ToMessage (line 360) | internal string ToMessage()
class Message (line 374) | public class Message
method Message (line 376) | public Message(string header, string body)
method FromString (line 386) | public static Message FromString(string message)
method ToString (line 403) | public override string ToString()
FILE: GVFS/GVFS.Common/NamedPipes/NamedPipeClient.cs
class NamedPipeClient (line 7) | public class NamedPipeClient : IDisposable
method NamedPipeClient (line 14) | public NamedPipeClient(string pipeName)
method Connect (line 19) | public bool Connect(int timeoutMilliseconds = 3000)
method TrySendRequest (line 46) | public bool TrySendRequest(NamedPipeMessages.Message message)
method SendRequest (line 60) | public void SendRequest(NamedPipeMessages.Message message)
method SendRequest (line 65) | public void SendRequest(string message)
method ReadRawResponse (line 79) | public string ReadRawResponse()
method ReadResponse (line 97) | public NamedPipeMessages.Message ReadResponse()
method TryReadResponse (line 102) | public bool TryReadResponse(out NamedPipeMessages.Message message)
method Dispose (line 116) | public void Dispose()
method ValidateConnection (line 130) | private void ValidateConnection()
FILE: GVFS/GVFS.Common/NamedPipes/NamedPipeMessages.cs
class NamedPipeMessages (line 14) | public static partial class NamedPipeMessages
type CompletionState (line 21) | public enum CompletionState
class GetStatus (line 28) | public static class GetStatus
class Response (line 36) | public class Response
method FromJson (line 47) | public static Response FromJson(string json)
method ToJson (line 52) | public string ToJson()
class Unmount (line 59) | public static class Unmount
class ModifiedPaths (line 69) | public static class ModifiedPaths
class Request (line 76) | public class Request
method Request (line 78) | public Request(Message message)
class Response (line 86) | public class Response
method Response (line 88) | public Response(string result, string data = "")
method CreateMessage (line 97) | public Message CreateMessage()
class DownloadObject (line 104) | public static class DownloadObject
class Request (line 111) | public class Request
method Request (line 113) | public Request(Message message)
method CreateMessage (line 120) | public Message CreateMessage()
class Response (line 126) | public class Response
method Response (line 128) | public Response(string result)
method CreateMessage (line 135) | public Message CreateMessage()
class PostIndexChanged (line 142) | public static class PostIndexChanged
class Request (line 148) | public class Request
method Request (line 150) | public Request(Message message)
method Request (line 161) | public Request(bool updatedWorkingDirectory, bool updatedSkipWorkt...
method CreateMessage (line 171) | public Message CreateMessage()
method BoolToString (line 176) | private string BoolToString(bool value)
class Response (line 182) | public class Response
method Response (line 184) | public Response(string result)
method CreateMessage (line 191) | public Message CreateMessage()
class DehydrateFolders (line 198) | public static class DehydrateFolders
class Request (line 204) | public class Request
method Request (line 206) | public Request(string backupFolderPath, string folders)
method FromMessage (line 212) | public static Request FromMessage(Message message)
method CreateMessage (line 221) | public Message CreateMessage()
class Response (line 227) | public class Response
method Response (line 229) | public Response(string result)
method FromMessage (line 240) | public static Response FromMessage(Message message)
method CreateMessage (line 245) | public Message CreateMessage()
class RunPostFetchJob (line 252) | public static class RunPostFetchJob
class Request (line 258) | public class Request
method Request (line 260) | public Request(List<string> packIndexes)
method Request (line 265) | public Request(Message message)
method CreateMessage (line 277) | public Message CreateMessage()
class Response (line 283) | public class Response
method Response (line 285) | public Response(string result)
method CreateMessage (line 292) | public Message CreateMessage()
class Notification (line 299) | public static class Notification
class Request (line 301) | public class Request
type Identifier (line 305) | public enum Identifier
method FromMessage (line 325) | public static Request FromMessage(Message message)
method ToMessage (line 330) | public Message ToMessage()
class UnregisterRepoRequest (line 337) | public class UnregisterRepoRequest
method FromMessage (line 343) | public static UnregisterRepoRequest FromMessage(Message message)
method ToMessage (line 348) | public Message ToMessage()
class Response (line 353) | public class Response : BaseResponse<UnregisterRepoRequest>
method FromMessage (line 355) | public static Response FromMessage(Message message)
class RegisterRepoRequest (line 362) | public class RegisterRepoRequest
method FromMessage (line 369) | public static RegisterRepoRequest FromMessage(Message message)
method ToMessage (line 374) | public Message ToMessage()
class Response (line 379) | public class Response : BaseResponse<RegisterRepoRequest>
method FromMessage (line 381) | public static Response FromMessage(Message message)
class EnableAndAttachProjFSRequest (line 388) | public class EnableAndAttachProjFSRequest
method FromMessage (line 394) | public static EnableAndAttachProjFSRequest FromMessage(Message message)
method ToMessage (line 399) | public Message ToMessage()
class Response (line 404) | public class Response : BaseResponse<EnableAndAttachProjFSRequest>
method FromMessage (line 406) | public static Response FromMessage(Message message)
class GetActiveRepoListRequest (line 413) | public class GetActiveRepoListRequest
method FromMessage (line 417) | public static GetActiveRepoListRequest FromMessage(Message message)
method ToMessage (line 422) | public Message ToMessage()
class Response (line 427) | public class Response : BaseResponse<GetActiveRepoListRequest>
method FromMessage (line 431) | public static Response FromMessage(Message message)
class BaseResponse (line 438) | public class BaseResponse<TRequest>
method ToMessage (line 445) | public Message ToMessage()
FILE: GVFS/GVFS.Common/NamedPipes/NamedPipeServer.cs
class NamedPipeServer (line 23) | public class NamedPipeServer : IDisposable
method NamedPipeServer (line 32) | private NamedPipeServer(string pipeName, ITracer tracer, Action<Connec...
method StartNewServer (line 40) | public static NamedPipeServer StartNewServer(string pipeName, ITracer ...
method Dispose (line 53) | public void Dispose()
method HandleConnection (line 64) | private static void HandleConnection(ITracer tracer, Connection connec...
method OpenListeningPipe (line 80) | private void OpenListeningPipe()
method OnNewConnection (line 98) | private void OnNewConnection(IAsyncResult ar)
method OnNewConnection (line 106) | private void OnNewConnection(IAsyncResult ar, bool createNewThreadIfSy...
method LogErrorAndExit (line 167) | private void LogErrorAndExit(string message, Exception e)
class Connection (line 184) | public class Connection
method Connection (line 192) | public Connection(NamedPipeServerStream serverStream, ITracer tracer...
method ReadMessage (line 206) | public NamedPipeMessages.Message ReadMessage()
method ReadRequest (line 211) | public string ReadRequest()
method TrySendResponse (line 231) | public virtual bool TrySendResponse(string message)
method TrySendResponse (line 244) | public bool TrySendResponse(NamedPipeMessages.Message message)
FILE: GVFS/GVFS.Common/NamedPipes/NamedPipeStreamReader.cs
class NamedPipeStreamReader (line 12) | public class NamedPipeStreamReader
method NamedPipeStreamReader (line 20) | public NamedPipeStreamReader(Stream stream)
method ReadMessage (line 30) | public string ReadMessage()
method TryReadByte (line 67) | private bool TryReadByte(out byte readByte)
FILE: GVFS/GVFS.Common/NamedPipes/NamedPipeStreamWriter.cs
class NamedPipeStreamWriter (line 6) | public class NamedPipeStreamWriter
method NamedPipeStreamWriter (line 12) | public NamedPipeStreamWriter(Stream stream)
method WriteMessage (line 17) | public void WriteMessage(string message)
FILE: GVFS/GVFS.Common/NamedPipes/PipeNameLengthException.cs
class PipeNameLengthException (line 5) | public class PipeNameLengthException : Exception
method PipeNameLengthException (line 7) | public PipeNameLengthException(string message)
FILE: GVFS/GVFS.Common/NamedPipes/UnstageNamedPipeMessages.cs
class NamedPipeMessages (line 3) | public static partial class NamedPipeMessages
class PrepareForUnstage (line 5) | public static class PrepareForUnstage
class Response (line 11) | public class Response
method Response (line 13) | public Response(string result)
method CreateMessage (line 20) | public Message CreateMessage()
FILE: GVFS/GVFS.Common/NativeMethods.Shared.cs
class NativeMethods (line 10) | public static partial class NativeMethods
type FileAttributes (line 12) | public enum FileAttributes : uint
type FileAccess (line 41) | public enum FileAccess : uint
type ProcessAccessFlags (line 80) | [Flags]
method GetFinalPathName (line 98) | public static string GetFinalPathName(string path)
method ThrowLastWin32Exception (line 146) | public static void ThrowLastWin32Exception(string message)
method OpenProcess (line 151) | [DllImport("kernel32.dll", SetLastError = true)]
method GetExitCodeProcess (line 157) | [DllImport("kernel32.dll", SetLastError = true)]
method CreateFile (line 161) | [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unic...
method GetFinalPathNameByHandle (line 171) | [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unic...
FILE: GVFS/GVFS.Common/NativeMethods.cs
class NativeMethods (line 10) | public static partial class NativeMethods
type MoveFileFlags (line 23) | [Flags]
type FileSystemFlags (line 34) | [Flags]
method FlushFileBuffers (line 40) | public static void FlushFileBuffers(string path)
method IsFeatureSupportedByVolume (line 63) | public static bool IsFeatureSupportedByVolume(string volumeRoot, FileS...
method FlushTraceLogger (line 85) | public static uint FlushTraceLogger(string sessionName, string session...
method MoveFile (line 97) | public static void MoveFile(string existingFileName, string newFileNam...
method SetDirectoryLastWriteTime (line 105) | public static void SetDirectoryLastWriteTime(string path, DateTime las...
method GetWindowsBuildNumber (line 156) | public static uint GetWindowsBuildNumber()
method IsSymLink (line 168) | public static bool IsSymLink(string path)
method GetLastRebootTime (line 196) | public static DateTime GetLastRebootTime()
method MoveFileEx (line 205) | [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unic...
method FlushFileBuffers (line 211) | [DllImport("kernel32.dll", SetLastError = true)]
method GetVolumeInformation (line 214) | [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unic...
method ControlTrace (line 225) | [DllImport("advapi32.dll", EntryPoint = "ControlTraceW", CharSet = Cha...
method GetVersionEx (line 232) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
method DeviceIoControl (line 236) | [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unic...
method GetTickCount64 (line 247) | [DllImport("kernel32.dll")]
method SetFileTime (line 250) | [DllImport("kernel32.dll", SetLastError = true)]
type REPARSE_DATA_BUFFER (line 257) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
type WNodeHeader (line 271) | [StructLayout(LayoutKind.Sequential)]
type EventTraceProperties (line 283) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
type OSVersionInfo (line 314) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
FILE: GVFS/GVFS.Common/NetworkStreams/BatchedLooseObjectDeserializer.cs
class BatchedLooseObjectDeserializer (line 11) | public class BatchedLooseObjectDeserializer
method BatchedLooseObjectDeserializer (line 25) | public BatchedLooseObjectDeserializer(Stream source, OnLooseObject onL...
method ProcessObjects (line 40) | public int ProcessObjects()
method ShouldContinueReading (line 81) | private bool ShouldContinueReading(byte[] curObjectHeader)
method ValidateHeader (line 122) | private void ValidateHeader()
FILE: GVFS/GVFS.Common/NetworkStreams/PrefetchPacksDeserializer.cs
class PrefetchPacksDeserializer (line 12) | public class PrefetchPacksDeserializer
method PrefetchPacksDeserializer (line 25) | public PrefetchPacksDeserializer(Stream source)
method EnumeratePacks (line 34) | public IEnumerable<PackAndIndex> EnumeratePacks()
method ReadPackCount (line 60) | private ushort ReadPackCount(byte[] buffer)
method ReadPackHeader (line 69) | private void ReadPackHeader(
method ValidateHeader (line 98) | private void ValidateHeader()
class PackAndIndex (line 108) | public class PackAndIndex
method PackAndIndex (line 110) | public PackAndIndex(Stream packStream, Stream idxStream, long timest...
FILE: GVFS/GVFS.Common/NetworkStreams/RestrictedStream.cs
class RestrictedStream (line 9) | internal class RestrictedStream : Stream
method RestrictedStream (line 18) | public RestrictedStream(Stream stream, long length, bool leaveOpen = t...
method Close (line 70) | public override void Close()
method Read (line 85) | public override int Read(byte[] buffer, int offset, int count)
method Seek (line 103) | public override long Seek(long offset, SeekOrigin origin)
method Flush (line 139) | public override void Flush()
method SetLength (line 144) | public override void SetLength(long value)
method Write (line 149) | public override void Write(byte[] buffer, int offset, int count)
FILE: GVFS/GVFS.Common/OrgInfoApiClient.cs
class OrgInfoApiClient (line 13) | public class OrgInfoApiClient
method OrgInfoApiClient (line 20) | public OrgInfoApiClient(HttpClient client, string baseUrl)
method QueryNewestVersion (line 34) | public Version QueryNewestVersion(string orgName, string platform, str...
method ConstructRequest (line 54) | private string ConstructRequest(string baseUrl, Dictionary<string, str...
FILE: GVFS/GVFS.Common/Paths.Shared.cs
class Paths (line 7) | public static class Paths
method GetGitEnlistmentRoot (line 9) | public static string GetGitEnlistmentRoot(string directory)
method GetRoot (line 14) | public static string GetRoot(string startingDirectory, string rootName)
method ConvertPathToGitFormat (line 54) | public static string ConvertPathToGitFormat(string path)
FILE: GVFS/GVFS.Common/Prefetch/BlobPrefetcher.cs
class BlobPrefetcher (line 17) | public class BlobPrefetcher
method BlobPrefetcher (line 38) | public BlobPrefetcher(
method BlobPrefetcher (line 50) | public BlobPrefetcher(
method TryLoadFolderList (line 86) | public static bool TryLoadFolderList(Enlistment enlistment, string fol...
method TryLoadFileList (line 102) | public static bool TryLoadFileList(Enlistment enlistment, string files...
method IsNoopPrefetch (line 129) | public static bool IsNoopPrefetch(
method AppendToNewlineSeparatedFile (line 173) | public static void AppendToNewlineSeparatedFile(string filename, strin...
method AppendToNewlineSeparatedFile (line 178) | public static void AppendToNewlineSeparatedFile(PhysicalFileSystem fil...
method Prefetch (line 206) | public virtual void Prefetch(string branchOrCommit, bool isBranch)
method PrefetchWithStats (line 215) | public void PrefetchWithStats(
method UpdateRefSpec (line 391) | protected bool UpdateRefSpec(ITracer tracer, Enlistment enlistment, st...
method UpdateRefs (line 422) | protected virtual void UpdateRefs(string branchOrCommit, bool isBranch...
method UpdateRef (line 442) | protected bool UpdateRef(ITracer tracer, string refName, string target...
method DownloadMissingCommit (line 471) | protected void DownloadMissingCommit(string commitSha, GitObjects gitO...
method GetFilesFromVerbParameter (line 494) | private static IEnumerable<string> GetFilesFromVerbParameter(string va...
method GetFilesFromFile (line 499) | private static IEnumerable<string> GetFilesFromFile(string fileName, o...
method GetFilesFromStdin (line 517) | private static IEnumerable<string> GetFilesFromStdin(bool shouldRead)
method TryLoadFileOrFolderList (line 531) | private static bool TryLoadFileOrFolderList(Enlistment enlistment, str...
method ToFilterPath (line 562) | private static string ToFilterPath(string path, bool isFolder)
method IsSymbolicRef (line 577) | private bool IsSymbolicRef(string targetCommitish)
method SavePrefetchArgs (line 582) | private void SavePrefetchArgs(string targetCommit, bool hydrate)
class FetchException (line 597) | public class FetchException : Exception
method FetchException (line 599) | public FetchException(string format, params object[] args)
class PrefetchArgs (line 605) | private static class PrefetchArgs
FILE: GVFS/GVFS.Common/Prefetch/Git/DiffHelper.cs
class DiffHelper (line 11) | public class DiffHelper
method DiffHelper (line 27) | public DiffHelper(ITracer tracer, Enlistment enlistment, IEnumerable<s...
method DiffHelper (line 32) | public DiffHelper(ITracer tracer, Enlistment enlistment, GitProcess gi...
method PerformDiff (line 81) | public void PerformDiff(string targetCommitSha)
method PerformDiff (line 94) | public void PerformDiff(string sourceTreeSha, string targetTreeSha)
method ParseDiffFile (line 151) | public void ParseDiffFile(string filename)
method FlushStagedQueues (line 167) | private void FlushStagedQueues()
method EnqueueOperationsFromLsTreeLine (line 210) | private void EnqueueOperationsFromLsTreeLine(ITracer activity, string ...
method EnqueueOperationsFromDiffTreeLine (line 243) | private void EnqueueOperationsFromDiffTreeLine(ITracer activity, strin...
method ShouldIncludeResult (line 325) | private bool ShouldIncludeResult(DiffTreeResult blobAdd)
method EnqueueFileDeleteOperation (line 358) | private void EnqueueFileDeleteOperation(ITracer activity, string targe...
method EnqueueFileAddOperation (line 376) | private void EnqueueFileAddOperation(ITracer activity, DiffTreeResult ...
class DiffTreeByNameComparer (line 412) | private class DiffTreeByNameComparer : IEqualityComparer<DiffTreeResult>
method Equals (line 414) | public bool Equals(DiffTreeResult x, DiffTreeResult y)
method GetHashCode (line 432) | public int GetHashCode(DiffTreeResult obj)
FILE: GVFS/GVFS.Common/Prefetch/Git/PathWithMode.cs
class PathWithMode (line 5) | public class PathWithMode
method PathWithMode (line 7) | public PathWithMode(string path, ushort mode)
method Equals (line 16) | public override bool Equals(object obj)
method GetHashCode (line 28) | public override int GetHashCode()
FILE: GVFS/GVFS.Common/Prefetch/Git/PrefetchGitObjects.cs
class PrefetchGitObjects (line 8) | public class PrefetchGitObjects : GitObjects
method PrefetchGitObjects (line 10) | public PrefetchGitObjects(ITracer tracer, Enlistment enlistment, GitOb...
FILE: GVFS/GVFS.Common/Prefetch/Pipeline/BatchObjectDownloadStage.cs
class BatchObjectDownloadStage (line 18) | public class BatchObjectDownloadStage : PrefetchPipelineStage
method BatchObjectDownloadStage (line 37) | public BatchObjectDownloadStage(
method DoBeforeWork (line 65) | protected override void DoBeforeWork()
method DoWork (line 71) | protected override void DoWork()
method DoAfterWork (line 112) | protected override void DoAfterWork()
method WriteObjectOrPack (line 124) | private RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.Call...
method EmitHeartbeat (line 194) | private void EmitHeartbeat(object state)
class DownloadRequestAggregator (line 201) | private class DownloadRequestAggregator
method DownloadRequestAggregator (line 206) | public DownloadRequestAggregator(BlockingCollection<string> missingB...
method TryTake (line 212) | public bool TryTake(out BlobDownloadRequest request)
FILE: GVFS/GVFS.Common/Prefetch/Pipeline/Data/BlobDownloadRequest.cs
class BlobDownloadRequest (line 6) | public class BlobDownloadRequest
method BlobDownloadRequest (line 10) | public BlobDownloadRequest(IReadOnlyList<string> objectIds)
FILE: GVFS/GVFS.Common/Prefetch/Pipeline/Data/IndexPackRequest.cs
class IndexPackRequest (line 3) | public class IndexPackRequest
method IndexPackRequest (line 5) | public IndexPackRequest(string tempPackFile, BlobDownloadRequest downl...
FILE: GVFS/GVFS.Common/Prefetch/Pipeline/Data/TreeSearchRequest.cs
class SearchTreeRequest (line 3) | public class SearchTreeRequest
method SearchTreeRequest (line 5) | public SearchTreeRequest(string treeSha, string rootPath, bool shouldR...
FILE: GVFS/GVFS.Common/Prefetch/Pipeline/FindBlobsStage.cs
class FindBlobsStage (line 12) | public class FindBlobsStage : PrefetchPipelineStage
method FindBlobsStage (line 25) | public FindBlobsStage(
method DoWork (line 55) | protected override void DoWork()
method DoAfterWork (line 79) | protected override void DoAfterWork()
FILE: GVFS/GVFS.Common/Prefetch/Pipeline/HydrateFilesStage.cs
class HydrateFilesStage (line 10) | public class HydrateFilesStage : PrefetchPipelineStage
method HydrateFilesStage (line 19) | public HydrateFilesStage(int maxThreads, string workingDirectoryRoot, ...
method DoWork (line 34) | protected override void DoWork()
FILE: GVFS/GVFS.Common/Prefetch/Pipeline/IndexPackStage.cs
class IndexPackStage (line 9) | public class IndexPackStage : PrefetchPipelineStage
method IndexPackStage (line 21) | public IndexPackStage(
method DoWork (line 37) | protected override void DoWork()
method DoAfterWork (line 70) | protected override void DoAfterWork()
FILE: GVFS/GVFS.Common/Prefetch/Pipeline/PrefetchPipelineStage.cs
class PrefetchPipelineStage (line 6) | public abstract class PrefetchPipelineStage
method PrefetchPipelineStage (line 11) | public PrefetchPipelineStage(int maxParallel)
method Start (line 18) | public void Start()
method WaitForCompletion (line 35) | public void WaitForCompletion()
method DoBeforeWork (line 51) | protected virtual void DoBeforeWork()
method DoWork (line 55) | protected abstract void DoWork();
method DoAfterWork (line 57) | protected virtual void DoAfterWork()
FILE: GVFS/GVFS.Common/ProcessHelper.cs
class ProcessHelper (line 9) | public static class ProcessHelper
method Run (line 13) | public static ProcessResult Run(string programName, string args, bool ...
method GetCurrentProcessLocation (line 27) | public static string GetCurrentProcessLocation()
method GetEntryClassName (line 33) | public static string GetEntryClassName()
method GetCurrentProcessVersion (line 46) | public static string GetCurrentProcessVersion()
method IsDevelopmentVersion (line 58) | public static bool IsDevelopmentVersion()
method GetProgramLocation (line 66) | public static string GetProgramLocation(string programLocaterCommand, ...
method Run (line 93) | public static ProcessResult Run(ProcessStartInfo processInfo, string e...
method StartProcess (line 128) | private static string StartProcess(Process executingProcess)
FILE: GVFS/GVFS.Common/ProcessResult.cs
class ProcessResult (line 3) | public class ProcessResult
method ProcessResult (line 5) | public ProcessResult(string output, string errors, int exitCode)
FILE: GVFS/GVFS.Common/ProcessRunnerImpl.cs
class ProcessRunnerImpl (line 9) | public class ProcessRunnerImpl : IProcessRunner
method Run (line 11) | public ProcessResult Run(string programName, string args, bool redirec...
FILE: GVFS/GVFS.Common/RepoMetadata.cs
class RepoMetadata (line 9) | public class RepoMetadata
method RepoMetadata (line 14) | private RepoMetadata(ITracer tracer)
method TryInitialize (line 41) | public static bool TryInitialize(ITracer tracer, string dotGVFSPath, o...
method TryInitialize (line 46) | public static bool TryInitialize(ITracer tracer, PhysicalFileSystem fi...
method Shutdown (line 78) | public static void Shutdown()
method TryGetOnDiskLayoutVersion (line 92) | public bool TryGetOnDiskLayoutVersion(out int majorVersion, out int mi...
method SaveCloneMetadata (line 131) | public void SaveCloneMetadata(ITracer tracer, GVFSEnlistment enlistment)
method SetProjectionInvalid (line 145) | public void SetProjectionInvalid(bool invalid)
method GetProjectionInvalid (line 150) | public bool GetProjectionInvalid()
method SetPlaceholdersNeedUpdate (line 155) | public void SetPlaceholdersNeedUpdate(bool needUpdate)
method GetPlaceholdersNeedUpdate (line 160) | public bool GetPlaceholdersNeedUpdate()
method SetProjectionInvalidAndPlaceholdersNeedUpdate (line 165) | public void SetProjectionInvalidAndPlaceholdersNeedUpdate()
method TryGetGitObjectsRoot (line 175) | public bool TryGetGitObjectsRoot(out string gitObjectsRoot, out string...
method SetGitObjectsRoot (line 197) | public void SetGitObjectsRoot(string gitObjectsRoot)
method TryGetLocalCacheRoot (line 202) | public bool TryGetLocalCacheRoot(out string localCacheRoot, out string...
method SetLocalCacheRoot (line 224) | public void SetLocalCacheRoot(string localCacheRoot)
method TryGetBlobSizesRoot (line 229) | public bool TryGetBlobSizesRoot(out string blobSizesRoot, out string e...
method SetBlobSizesRoot (line 251) | public void SetBlobSizesRoot(string blobSizesRoot)
method SetEntry (line 256) | public void SetEntry(string keyName, string valueName)
method CreateNewEnlistmentId (line 261) | private static string CreateNewEnlistmentId(ITracer tracer)
method SetInvalid (line 270) | private void SetInvalid(string keyName, bool invalid)
method HasEntry (line 282) | private bool HasEntry(string keyName)
class Keys (line 293) | public static class Keys
FILE: GVFS/GVFS.Common/RetryBackoff.cs
class RetryBackoff (line 5) | public static class RetryBackoff
method CalculateBackoffSeconds (line 34) | public static double CalculateBackoffSeconds(int currentFailedAttempt,...
FILE: GVFS/GVFS.Common/RetryCircuitBreaker.cs
class RetryCircuitBreaker (line 12) | public static class RetryCircuitBreaker
method RecordSuccess (line 38) | public static void RecordSuccess()
method RecordFailure (line 43) | public static void RecordFailure()
method Reset (line 55) | public static void Reset()
method Configure (line 66) | public static void Configure(int threshold, int cooldownMilliseconds)
FILE: GVFS/GVFS.Common/RetryConfig.cs
class RetryConfig (line 8) | public class RetryConfig
method RetryConfig (line 20) | public RetryConfig(int maxRetries = DefaultMaxRetries)
method RetryConfig (line 25) | public RetryConfig(int maxRetries, TimeSpan timeout)
method TryLoadFromGitConfig (line 39) | public static bool TryLoadFromGitConfig(ITracer tracer, Enlistment enl...
method TryLoadFromGitConfig (line 44) | public static bool TryLoadFromGitConfig(ITracer tracer, GitProcess git...
method TryLoadMaxRetries (line 102) | private static bool TryLoadMaxRetries(GitProcess git, out int attempts...
method TryLoadTimeout (line 113) | private static bool TryLoadTimeout(GitProcess git, out TimeSpan timeou...
method TryGetFromGitConfig (line 132) | private static bool TryGetFromGitConfig(GitProcess git, string configN...
FILE: GVFS/GVFS.Common/RetryWrapper.cs
class RetryWrapper (line 10) | public class RetryWrapper<T>
method RetryWrapper (line 17) | public RetryWrapper(int maxAttempts, CancellationToken cancellationTok...
method StandardErrorHandler (line 26) | public static Action<ErrorEventArgs> StandardErrorHandler(ITracer trac...
method Invoke (line 61) | public InvocationResult Invoke(Func<int, CallbackResult> toInvoke)
method IsHandlableException (line 146) | private bool IsHandlableException(Exception e)
method ShouldRetry (line 154) | private bool ShouldRetry(int tryCount, Exception e, CallbackResult res...
class ErrorEventArgs (line 171) | public class ErrorEventArgs
method ErrorEventArgs (line 173) | public ErrorEventArgs(Exception error, int tryCount, bool willRetry)
class InvocationResult (line 187) | public class InvocationResult
method InvocationResult (line 189) | public InvocationResult(int tryCount, bool succeeded, T result)
method InvocationResult (line 196) | public InvocationResult(int tryCount, Exception error)
method InvocationResult (line 203) | public InvocationResult(int tryCount, Exception error, T result)
class CallbackResult (line 215) | public class CallbackResult
method CallbackResult (line 217) | public CallbackResult(T result)
method CallbackResult (line 222) | public CallbackResult(Exception error, bool shouldRetry)
method CallbackResult (line 229) | public CallbackResult(Exception error, bool shouldRetry, T result)
FILE: GVFS/GVFS.Common/RetryableException.cs
class RetryableException (line 5) | public class RetryableException : Exception
method RetryableException (line 7) | public RetryableException(string message, Exception inner) : base(mess...
method RetryableException (line 11) | public RetryableException(string message) : base(message)
FILE: GVFS/GVFS.Common/ReturnCode.cs
type ReturnCode (line 3) | public enum ReturnCode
FILE: GVFS/GVFS.Common/SHA1Util.cs
class SHA1Util (line 8) | public static class SHA1Util
method IsValidShaFormat (line 10) | public static bool IsValidShaFormat(string sha)
method SHA1HashStringForUTF8String (line 15) | public static string SHA1HashStringForUTF8String(string s)
method SHA1ForUTF8String (line 20) | public static byte[] SHA1ForUTF8String(string s)
method HexStringFromBytes (line 34) | public static string HexStringFromBytes(byte[] buf, int numBytes = -1)
method BytesFromHexString (line 60) | public static byte[] BytesFromHexString(string sha)
method GetHexVal (line 72) | private static int GetHexVal(char hex)
FILE: GVFS/GVFS.Common/ServerGVFSConfig.cs
class ServerGVFSConfig (line 8) | public class ServerGVFSConfig
class VersionRange (line 14) | public class VersionRange
FILE: GVFS/GVFS.Common/StreamUtil.cs
class StreamUtil (line 6) | public class StreamUtil
method CopyToWithBuffer (line 26) | public static void CopyToWithBuffer(Stream source, Stream destination,...
method TryReadGreedy (line 61) | public static int TryReadGreedy(Stream stream, byte[] buf, int offset,...
FILE: GVFS/GVFS.Common/Tracing/DiagnosticConsoleEventListener.cs
class DiagnosticConsoleEventListener (line 9) | public class DiagnosticConsoleEventListener : EventListener
method DiagnosticConsoleEventListener (line 11) | public DiagnosticConsoleEventListener(EventLevel maxVerbosity, Keyword...
method RecordMessageInternal (line 16) | protected override void RecordMessageInternal(TraceEventMessage message)
FILE: GVFS/GVFS.Common/Tracing/EventLevel.cs
type EventLevel (line 5) | public enum EventLevel
FILE: GVFS/GVFS.Common/Tracing/EventListener.cs
class EventListener (line 6) | public abstract class EventListener : IDisposable
method EventListener (line 12) | protected EventListener(EventLevel maxVerbosity, Keywords keywordFilte...
method Dispose (line 19) | public virtual void Dispose()
method RecordMessage (line 23) | public void RecordMessage(TraceEventMessage message)
method RecordMessageInternal (line 38) | protected abstract void RecordMessageInternal(TraceEventMessage message);
method GetLogString (line 40) | protected string GetLogString(string eventName, EventOpcode opcode, st...
method IsEnabled (line 59) | protected bool IsEnabled(EventLevel level, Keywords keyword)
method RaiseListenerRecovery (line 66) | protected void RaiseListenerRecovery()
method RaiseListenerFailure (line 71) | protected void RaiseListenerFailure(string errorMessage)
FILE: GVFS/GVFS.Common/Tracing/EventMetadata.cs
class EventMetadata (line 7) | public class EventMetadata : Dictionary<string, object>
method EventMetadata (line 9) | public EventMetadata()
method EventMetadata (line 13) | public EventMetadata(Dictionary<string, object> metadata)
FILE: GVFS/GVFS.Common/Tracing/EventOpcode.cs
type EventOpcode (line 4) | public enum EventOpcode
FILE: GVFS/GVFS.Common/Tracing/IEventListenerEventSink.cs
type IEventListenerEventSink (line 3) | public interface IEventListenerEventSink
method OnListenerRecovery (line 5) | void OnListenerRecovery(EventListener listener);
method OnListenerFailure (line 7) | void OnListenerFailure(EventListener listener, string errorMessage);
FILE: GVFS/GVFS.Common/Tracing/IQueuedPipeStringWriterEventSink.cs
type IQueuedPipeStringWriterEventSink (line 5) | public interface IQueuedPipeStringWriterEventSink
method OnStateChanged (line 7) | void OnStateChanged(QueuedPipeStringWriter writer, QueuedPipeStringWri...
FILE: GVFS/GVFS.Common/Tracing/ITracer.cs
type ITracer (line 5) | public interface ITracer : IDisposable
method StartActivity (line 7) | ITracer StartActivity(string activityName, EventLevel level);
method StartActivity (line 9) | ITracer StartActivity(string activityName, EventLevel level, EventMeta...
method StartActivity (line 10) | ITracer StartActivity(string activityName, EventLevel level, Keywords ...
method SetGitCommandSessionId (line 12) | void SetGitCommandSessionId(string sessionId);
method RelatedEvent (line 14) | void RelatedEvent(EventLevel level, string eventName, EventMetadata me...
method RelatedEvent (line 16) | void RelatedEvent(EventLevel level, string eventName, EventMetadata me...
method RelatedInfo (line 18) | void RelatedInfo(string message);
method RelatedInfo (line 20) | void RelatedInfo(string format, params object[] args);
method RelatedInfo (line 22) | void RelatedInfo(EventMetadata metadata, string message);
method RelatedWarning (line 24) | void RelatedWarning(EventMetadata metadata, string message);
method RelatedWarning (line 26) | void RelatedWarning(EventMetadata metadata, string message, Keywords k...
method RelatedWarning (line 28) | void RelatedWarning(string message);
method RelatedWarning (line 30) | void RelatedWarning(string format, params object[] args);
method RelatedError (line 32) | void RelatedError(EventMetadata metadata, string message);
method RelatedError (line 34) | void RelatedError(EventMetadata metadata, string message, Keywords key...
method RelatedError (line 36) | void RelatedError(string message);
method RelatedError (line 38) | void RelatedError(string format, params object[] args);
method Stop (line 40) | TimeSpan Stop(EventMetadata metadata);
FILE: GVFS/GVFS.Common/Tracing/JsonTracer.cs
class JsonTracer (line 11) | public class JsonTracer : ITracer, IEventListenerEventSink
method JsonTracer (line 29) | public JsonTracer(string providerName, string activityName, bool disab...
method JsonTracer (line 34) | public JsonTracer(string providerName, string activityName, string enl...
method JsonTracer (line 39) | public JsonTracer(string providerName, Guid providerActivityId, string...
method JsonTracer (line 66) | private JsonTracer(ConcurrentBag<EventListener> listeners, Guid parent...
method SetGitCommandSessionId (line 85) | public void SetGitCommandSessionId(string sessionId)
method AddEventListener (line 94) | public void AddEventListener(EventListener listener)
method AddDiagnosticConsoleEventListener (line 111) | public void AddDiagnosticConsoleEventListener(EventLevel maxVerbosity,...
method AddPrettyConsoleEventListener (line 116) | public void AddPrettyConsoleEventListener(EventLevel maxVerbosity, Key...
method AddLogFileEventListener (line 121) | public void AddLogFileEventListener(string logFilePath, EventLevel max...
method Dispose (line 126) | public void Dispose()
method RelatedEvent (line 150) | public virtual void RelatedEvent(EventLevel level, string eventName, E...
method RelatedEvent (line 155) | public virtual void RelatedEvent(EventLevel level, string eventName, E...
method RelatedInfo (line 160) | public virtual void RelatedInfo(string format, params object[] args)
method RelatedInfo (line 165) | public virtual void RelatedInfo(string message)
method RelatedInfo (line 170) | public virtual void RelatedInfo(EventMetadata metadata, string message)
method RelatedWarning (line 177) | public virtual void RelatedWarning(EventMetadata metadata, string mess...
method RelatedWarning (line 182) | public virtual void RelatedWarning(EventMetadata metadata, string mess...
method RelatedWarning (line 189) | public virtual void RelatedWarning(string message)
method RelatedWarning (line 195) | public virtual void RelatedWarning(string format, params object[] args)
method RelatedError (line 200) | public virtual void RelatedError(EventMetadata metadata, string message)
method RelatedError (line 205) | public virtual void RelatedError(EventMetadata metadata, string messag...
method RelatedError (line 212) | public virtual void RelatedError(string message)
method RelatedError (line 218) | public virtual void RelatedError(string format, params object[] args)
method Stop (line 223) | public TimeSpan Stop(EventMetadata metadata)
method StartActivity (line 241) | public ITracer StartActivity(string childActivityName, EventLevel star...
method StartActivity (line 246) | public ITracer StartActivity(string childActivityName, EventLevel star...
method StartActivity (line 251) | public ITracer StartActivity(string childActivityName, EventLevel star...
method WriteStartEvent (line 261) | public void WriteStartEvent(
method WriteStartEvent (line 298) | public void WriteStartEvent(EventMetadata metadata, Keywords keywords)
method OnListenerRecovery (line 303) | void IEventListenerEventSink.OnListenerRecovery(EventListener listener)
method OnListenerFailure (line 320) | void IEventListenerEventSink.OnListenerFailure(EventListener listener,...
method GetCategorizedErrorEventName (line 332) | private static string GetCategorizedErrorEventName(Keywords keywords)
method CreateListenerRecoveryMessage (line 341) | private static TraceEventMessage CreateListenerRecoveryMessage(EventLi...
method CreateListenerFailureMessage (line 356) | private static TraceEventMessage CreateListenerFailureMessage(EventLis...
method WriteEvent (line 372) | private void WriteEvent(string eventName, EventLevel level, Keywords k...
method LogMessageToNonFailedListeners (line 400) | private void LogMessageToNonFailedListeners(TraceEventMessage message)
FILE: GVFS/GVFS.Common/Tracing/Keywords.cs
type Keywords (line 3) | public enum Keywords : long
FILE: GVFS/GVFS.Common/Tracing/LogFileEventListener.cs
class LogFileEventListener (line 6) | public class LogFileEventListener : EventListener
method LogFileEventListener (line 11) | public LogFileEventListener(string logFilePath, EventLevel maxVerbosit...
method Dispose (line 17) | public override void Dispose()
method RecordMessageInternal (line 32) | protected override void RecordMessageInternal(TraceEventMessage message)
method SetLogFilePath (line 38) | protected void SetLogFilePath(string newfilePath)
FILE: GVFS/GVFS.Common/Tracing/NullTracer.cs
class NullTracer (line 12) | public sealed class NullTracer : ITracer
method NullTracer (line 14) | private NullTracer()
method Dispose (line 20) | void IDisposable.Dispose()
method RelatedError (line 25) | void ITracer.RelatedError(EventMetadata metadata, string message)
method RelatedError (line 30) | void ITracer.RelatedError(EventMetadata metadata, string message, Keyw...
method RelatedError (line 35) | void ITracer.RelatedError(string message)
method RelatedError (line 40) | void ITracer.RelatedError(string format, params object[] args)
method RelatedEvent (line 45) | void ITracer.RelatedEvent(EventLevel level, string eventName, EventMet...
method RelatedEvent (line 50) | void ITracer.RelatedEvent(EventLevel level, string eventName, EventMet...
method RelatedInfo (line 55) | void ITracer.RelatedInfo(string message)
method RelatedInfo (line 60) | void ITracer.RelatedInfo(string format, params object[] args)
method RelatedInfo (line 65) | void ITracer.RelatedInfo(EventMetadata metadata, string message)
method RelatedWarning (line 70) | void ITracer.RelatedWarning(EventMetadata metadata, string message)
method RelatedWarning (line 75) | void ITracer.RelatedWarning(EventMetadata metadata, string message, Ke...
method RelatedWarning (line 80) | void ITracer.RelatedWarning(string message)
method RelatedWarning (line 85) | void ITracer.RelatedWarning(string format, params object[] args)
method SetGitCommandSessionId (line 90) | void ITracer.SetGitCommandSessionId(string sessionId)
method StartActivity (line 95) | ITracer ITracer. StartActivity(string activityName, EventLevel level)
method StartActivity (line 100) | ITracer ITracer. StartActivity(string activityName, EventLevel level, ...
method StartActivity (line 105) | ITracer ITracer. StartActivity(string activityName, EventLevel level, ...
method Stop (line 110) | TimeSpan ITracer.Stop(EventMetadata metadata)
FILE: GVFS/GVFS.Common/Tracing/PrettyConsoleEventListener.cs
class PrettyConsoleEventListener (line 11) | public class PrettyConsoleEventListener : EventListener
method PrettyConsoleEventListener (line 15) | public PrettyConsoleEventListener(EventLevel maxVerbosity, Keywords ke...
method RecordMessageInternal (line 20) | protected override void RecordMessageInternal(TraceEventMessage message)
class ConsoleOutputPayload (line 63) | private class ConsoleOutputPayload
FILE: GVFS/GVFS.Common/Tracing/QueuedPipeStringWriter.cs
type QueuedPipeStringWriterState (line 10) | public enum QueuedPipeStringWriterState
class QueuedPipeStringWriter (line 22) | public class QueuedPipeStringWriter : IDisposable
method QueuedPipeStringWriter (line 35) | public QueuedPipeStringWriter(Func<NamedPipeClientStream> createPipeFu...
method Start (line 42) | public void Start()
method TryEnqueue (line 63) | public bool TryEnqueue(string message)
method Stop (line 73) | public void Stop()
method Dispose (line 92) | public void Dispose()
method RaiseStateChanged (line 109) | private void RaiseStateChanged(QueuedPipeStringWriterState newState, E...
method BackgroundWriterThreadProc (line 118) | private void BackgroundWriterThreadProc()
method WriteMessage (line 135) | private void WriteMessage(string message)
FILE: GVFS/GVFS.Common/Tracing/TelemetryDaemonEventListener.cs
class TelemetryDaemonEventListener (line 8) | public class TelemetryDaemonEventListener : EventListener, IQueuedPipeSt...
method TelemetryDaemonEventListener (line 17) | private TelemetryDaemonEventListener(
method CreateIfEnabled (line 38) | public static TelemetryDaemonEventListener CreateIfEnabled(string gitB...
method Dispose (line 52) | public override void Dispose()
method OnStateChanged (line 64) | void IQueuedPipeStringWriterEventSink.OnStateChanged(
method RecordMessageInternal (line 80) | protected override void RecordMessageInternal(TraceEventMessage message)
method GetConfigValue (line 92) | private static string GetConfigValue(string gitBinRoot, string configKey)
method CreatePipeMessage (line 107) | private string CreatePipeMessage(TraceEventMessage message)
class PipeMessage (line 130) | public class PipeMessage
method FromJson (line 145) | public static PipeMessage FromJson(string json)
method ToJson (line 150) | public string ToJson()
class PipeMessagePayload (line 155) | public class PipeMessagePayload
FILE: GVFS/GVFS.Common/Tracing/TraceEventMessage.cs
class TraceEventMessage (line 5) | public class TraceEventMessage
FILE: GVFS/GVFS.Common/Tracing/TracingConstants.cs
class TracingConstants (line 3) | public static class TracingConstants
class MessageKey (line 5) | public static class MessageKey
FILE: GVFS/GVFS.Common/VersionResponse.cs
class VersionResponse (line 5) | public class VersionResponse
method FromJsonString (line 9) | public static VersionResponse FromJsonString(string jsonString)
FILE: GVFS/GVFS.Common/WorktreeCommandParser.cs
class WorktreeCommandParser (line 19) | public static class WorktreeCommandParser
method GetSubcommand (line 26) | public static string GetSubcommand(string[] args)
method GetPositionalArg (line 48) | public static string GetPositionalArg(string[] args, int positionalIndex)
method GetPathArg (line 137) | public static string GetPathArg(string[] args)
FILE: GVFS/GVFS.Common/X509Certificates/CertificateVerifier.cs
class CertificateVerifier (line 5) | public class CertificateVerifier
method Verify (line 7) | public virtual bool Verify(X509Certificate2 certificate)
FILE: GVFS/GVFS.Common/X509Certificates/SystemCertificateStore.cs
class SystemCertificateStore (line 6) | public class SystemCertificateStore : IDisposable
method SystemCertificateStore (line 12) | public SystemCertificateStore()
method Dispose (line 17) | public void Dispose()
method Find (line 22) | public virtual X509Certificate2Collection Find(X509FindType findType, ...
FILE: GVFS/GVFS.FunctionalTests.LockHolder/AcquireGVFSLock.cs
class AcquireGVFSLockVerb (line 11) | public class AcquireGVFSLockVerb
method Execute (line 22) | public void Execute()
method TryGetGVFSEnlistmentRootImplementation (line 43) | private static bool TryGetGVFSEnlistmentRootImplementation(string dire...
method GetNamedPipeNameImplementation (line 65) | private static string GetNamedPipeNameImplementation(string enlistment...
method AcquireLock (line 71) | private static void AcquireLock(string enlistmentPipename)
method ReleaseLock (line 100) | private static void ReleaseLock(string enlistmentPipename, string enli...
FILE: GVFS/GVFS.FunctionalTests.LockHolder/Program.cs
class Program (line 5) | public class Program
method Main (line 7) | public static void Main(string[] args)
FILE: GVFS/GVFS.FunctionalTests/Categories.cs
class Categories (line 3) | public static class Categories
FILE: GVFS/GVFS.FunctionalTests/FileSystemRunners/BashRunner.cs
class BashRunner (line 12) | public class BashRunner : ShellRunner
method BashRunner (line 44) | public BashRunner()
type FileType (line 56) | private enum FileType
method DeleteDirectoryWithUnlimitedRetries (line 72) | public static void DeleteDirectoryWithUnlimitedRetries(string path)
method IsSymbolicLink (line 97) | public bool IsSymbolicLink(string path)
method CreateSymbolicLink (line 102) | public void CreateSymbolicLink(string newLinkFilePath, string existing...
method FileExists (line 110) | public override bool FileExists(string path)
method MoveFile (line 115) | public override string MoveFile(string sourcePath, string targetPath)
method MoveFileShouldFail (line 123) | public override void MoveFileShouldFail(string sourcePath, string targ...
method MoveFile_FileShouldNotBeFound (line 130) | public override void MoveFile_FileShouldNotBeFound(string sourcePath, ...
method ReplaceFile (line 135) | public override string ReplaceFile(string sourcePath, string targetPath)
method ReplaceFile_AccessShouldBeDenied (line 143) | public override void ReplaceFile_AccessShouldBeDenied(string sourcePat...
method DeleteFile (line 151) | public override string DeleteFile(string path)
method ReadAllText (line 158) | public override string ReadAllText(string path)
method AppendAllText (line 176) | public override void AppendAllText(string path, string contents)
method CreateEmptyFile (line 183) | public override void CreateEmptyFile(string path)
method CreateHardLink (line 190) | public override void CreateHardLink(string newLinkFilePath, string exi...
method WriteAllText (line 198) | public override void WriteAllText(string path, string contents)
method WriteAllTextShouldFail (line 205) | public override void WriteAllTextShouldFail<ExceptionType>(string path...
method DirectoryExists (line 211) | public override bool DirectoryExists(string path)
method MoveDirectory (line 216) | public override void MoveDirectory(string sourcePath, string targetPath)
method RenameDirectory (line 221) | public override void RenameDirectory(string workingDirectory, string s...
method MoveDirectory_RequestShouldNotBeSupported (line 226) | public override void MoveDirectory_RequestShouldNotBeSupported(string ...
method MoveDirectory_TargetShouldBeInvalid (line 231) | public override void MoveDirectory_TargetShouldBeInvalid(string source...
method CreateDirectory (line 236) | public override void CreateDirectory(string path)
method DeleteDirectory (line 243) | public override string DeleteDirectory(string path)
method EnumerateDirectory (line 250) | public override string EnumerateDirectory(string path)
method ReplaceFile_FileShouldNotBeFound (line 257) | public override void ReplaceFile_FileShouldNotBeFound(string sourcePat...
method DeleteFile_FileShouldNotBeFound (line 262) | public override void DeleteFile_FileShouldNotBeFound(string path)
method DeleteFile_AccessShouldBeDenied (line 267) | public override void DeleteFile_AccessShouldBeDenied(string path)
method ReadAllText_FileShouldNotBeFound (line 274) | public override void ReadAllText_FileShouldNotBeFound(string path)
method DeleteDirectory_DirectoryShouldNotBeFound (line 279) | public override void DeleteDirectory_DirectoryShouldNotBeFound(string ...
method ChangeMode (line 285) | public override void ChangeMode(string path, ushort mode)
method DeleteDirectory_ShouldBeBlockedByProcess (line 293) | public override void DeleteDirectory_ShouldBeBlockedByProcess(string p...
method FileSize (line 298) | public override long FileSize(string path)
method CreateFileWithoutClose (line 307) | public override void CreateFileWithoutClose(string path)
method OpenFileAndWriteWithoutClose (line 312) | public override void OpenFileAndWriteWithoutClose(string path, string ...
method FileExistsOnDisk (line 317) | private bool FileExistsOnDisk(string path, FileType type)
method ConvertWinPathToBashPath (line 342) | private string ConvertWinPathToBashPath(string winPath)
FILE: GVFS/GVFS.FunctionalTests/FileSystemRunners/CmdRunner.cs
class CmdRunner (line 10) | public class CmdRunner : ShellRunner
method DeleteDirectoryWithUnlimitedRetries (line 39) | public static void DeleteDirectoryWithUnlimitedRetries(string path)
method FileExists (line 64) | public override bool FileExists(string path)
method MoveFile (line 76) | public override string MoveFile(string sourcePath, string targetPath)
method MoveFileShouldFail (line 81) | public override void MoveFileShouldFail(string sourcePath, string targ...
method MoveFile_FileShouldNotBeFound (line 87) | public override void MoveFile_FileShouldNotBeFound(string sourcePath, ...
method ReplaceFile (line 92) | public override string ReplaceFile(string sourcePath, string targetPath)
method ReplaceFile_AccessShouldBeDenied (line 97) | public override void ReplaceFile_AccessShouldBeDenied(string sourcePat...
method DeleteFile (line 105) | public override string DeleteFile(string path)
method ReadAllText (line 110) | public override string ReadAllText(string path)
method CreateEmptyFile (line 115) | public override void CreateEmptyFile(string path)
method CreateHardLink (line 120) | public override void CreateHardLink(string newLinkFilePath, string exi...
method AppendAllText (line 125) | public override void AppendAllText(string path, string contents)
method WriteAllText (line 132) | public override void WriteAllText(string path, string contents)
method WriteAllTextShouldFail (line 139) | public override void WriteAllTextShouldFail<ExceptionType>(string path...
method DirectoryExists (line 145) | public override bool DirectoryExists(string path)
method CreateDirectory (line 164) | public override void CreateDirectory(string path)
method DeleteDirectory (line 169) | public override string DeleteDirectory(string path)
method EnumerateDirectory (line 174) | public override string EnumerateDirectory(string path)
method MoveDirectory (line 179) | public override void MoveDirectory(string sourcePath, string targetPath)
method RenameDirectory (line 184) | public override void RenameDirectory(string workingDirectory, string s...
method MoveDirectory_RequestShouldNotBeSupported (line 189) | public override void MoveDirectory_RequestShouldNotBeSupported(string ...
method MoveDirectory_TargetShouldBeInvalid (line 194) | public override void MoveDirectory_TargetShouldBeInvalid(string source...
method RunCommand (line 199) | public string RunCommand(string command)
method ReplaceFile_FileShouldNotBeFound (line 204) | public override void ReplaceFile_FileShouldNotBeFound(string sourcePat...
method DeleteFile_FileShouldNotBeFound (line 209) | public override void DeleteFile_FileShouldNotBeFound(string path)
method DeleteFile_AccessShouldBeDenied (line 214) | public override void DeleteFile_AccessShouldBeDenied(string path)
method ReadAllText_FileShouldNotBeFound (line 221) | public override void ReadAllText_FileShouldNotBeFound(string path)
method DeleteDirectory_DirectoryShouldNotBeFound (line 226) | public override void DeleteDirectory_DirectoryShouldNotBeFound(string ...
method DeleteDirectory_ShouldBeBlockedByProcess (line 231) | public override void DeleteDirectory_ShouldBeBlockedByProcess(string p...
method ChangeMode (line 236) | public override void ChangeMode(string path, ushort mode)
method CreateFileWithoutClose (line 241) | public override void CreateFileWithoutClose(string path)
method OpenFileAndWriteWithoutClose (line 246) | public override void OpenFileAndWriteWithoutClose(string path, string ...
method FileSize (line 251) | public override long FileSize(string path)
FILE: GVFS/GVFS.FunctionalTests/FileSystemRunners/FileSystemRunner.cs
class FileSystemRunner (line 6) | public abstract class FileSystemRunner
method FileExists (line 46) | public abstract bool FileExists(string path);
method MoveFile (line 47) | public abstract string MoveFile(string sourcePath, string targetPath);
method MoveFileShouldFail (line 56) | public abstract void MoveFileShouldFail(string sourcePath, string targ...
method MoveFile_FileShouldNotBeFound (line 57) | public abstract void MoveFile_FileShouldNotBeFound(string sourcePath, ...
method ReplaceFile (line 58) | public abstract string ReplaceFile(string sourcePath, string targetPath);
method ReplaceFile_FileShouldNotBeFound (line 59) | public abstract void ReplaceFile_FileShouldNotBeFound(string sourcePat...
method ReplaceFile_AccessShouldBeDenied (line 60) | public abstract void ReplaceFile_AccessShouldBeDenied(string sourcePat...
method DeleteFile (line 61) | public abstract string DeleteFile(string path);
method DeleteFile_FileShouldNotBeFound (line 62) | public abstract void DeleteFile_FileShouldNotBeFound(string path);
method DeleteFile_AccessShouldBeDenied (line 63) | public abstract void DeleteFile_AccessShouldBeDenied(string path);
method ReadAllText (line 64) | public abstract string ReadAllText(string path);
method ReadAllText_FileShouldNotBeFound (line 65) | public abstract void ReadAllText_FileShouldNotBeFound(string path);
method CreateEmptyFile (line 67) | public abstract void CreateEmptyFile(string path);
method CreateHardLink (line 68) | public abstract void CreateHardLink(string newLinkFilePath, string exi...
method ChangeMode (line 69) | public abstract void ChangeMode(string path, ushort mode);
method WriteAllText (line 78) | public abstract void WriteAllText(string path, string contents);
method CreateFileWithoutClose (line 79) | public abstract void CreateFileWithoutClose(string path);
method OpenFileAndWriteWithoutClose (line 80) | public abstract void OpenFileAndWriteWithoutClose(string path, string ...
method AppendAllText (line 89) | public abstract void AppendAllText(string path, string contents);
method WriteAllTextShouldFail (line 99) | public abstract void WriteAllTextShouldFail<ExceptionType>(string path...
method DirectoryExists (line 102) | public abstract bool DirectoryExists(string path);
method MoveDirectory (line 103) | public abstract void MoveDirectory(string sourcePath, string targetPath);
method RenameDirectory (line 104) | public abstract void RenameDirectory(string workingDirectory, string s...
method MoveDirectory_RequestShouldNotBeSupported (line 105) | public abstract void MoveDirectory_RequestShouldNotBeSupported(string ...
method MoveDirectory_TargetShouldBeInvalid (line 106) | public abstract void MoveDirectory_TargetShouldBeInvalid(string source...
method CreateDirectory (line 107) | public abstract void CreateDirectory(string path);
method EnumerateDirectory (line 108) | public abstract string EnumerateDirectory(string path);
method FileSize (line 109) | public abstract long FileSize(string path);
method DeleteDirectory (line 114) | public abstract string DeleteDirectory(string path);
method DeleteDirectory_DirectoryShouldNotBeFound (line 115) | public abstract void DeleteDirectory_DirectoryShouldNotBeFound(string ...
method DeleteDirectory_ShouldBeBlockedByProcess (line 116) | public abstract void DeleteDirectory_ShouldBeBlockedByProcess(string p...
FILE: GVFS/GVFS.FunctionalTests/FileSystemRunners/PowerShellRunner.cs
class PowerShellRunner (line 6) | public class PowerShellRunner : ShellRunner
method FileExists (line 43) | public override bool FileExists(string path)
method MoveFile (line 60) | public override string MoveFile(string sourcePath, string targetPath)
method MoveFileShouldFail (line 65) | public override void MoveFileShouldFail(string sourcePath, string targ...
method MoveFile_FileShouldNotBeFound (line 71) | public override void MoveFile_FileShouldNotBeFound(string sourcePath, ...
method ReplaceFile (line 76) | public override string ReplaceFile(string sourcePath, string targetPath)
method ReplaceFile_AccessShouldBeDenied (line 81) | public override void ReplaceFile_AccessShouldBeDenied(string sourcePat...
method DeleteFile (line 88) | public override string DeleteFile(string path)
method ReadAllText (line 93) | public override string ReadAllText(string path)
method AppendAllText (line 105) | public override void AppendAllText(string path, string contents)
method CreateEmptyFile (line 110) | public override void CreateEmptyFile(string path)
method CreateHardLink (line 115) | public override void CreateHardLink(string newLinkFilePath, string exi...
method WriteAllText (line 120) | public override void WriteAllText(string path, string contents)
method WriteAllTextShouldFail (line 125) | public override void WriteAllTextShouldFail<ExceptionType>(string path...
method DirectoryExists (line 131) | public override bool DirectoryExists(string path)
method MoveDirectory (line 144) | public override void MoveDirectory(string sourcePath, string targetPath)
method RenameDirectory (line 149) | public override void RenameDirectory(string workingDirectory, string s...
method MoveDirectory_RequestShouldNotBeSupported (line 154) | public override void MoveDirectory_RequestShouldNotBeSupported(string ...
method MoveDirectory_TargetShouldBeInvalid (line 159) | public override void MoveDirectory_TargetShouldBeInvalid(string source...
method CreateDirectory (line 164) | public override void CreateDirectory(string path)
method DeleteDirectory (line 169) | public override string DeleteDirectory(string path)
method EnumerateDirectory (line 174) | public override string EnumerateDirectory(string path)
method ReplaceFile_FileShouldNotBeFound (line 179) | public override void ReplaceFile_FileShouldNotBeFound(string sourcePat...
method DeleteFile_FileShouldNotBeFound (line 184) | public override void DeleteFile_FileShouldNotBeFound(string path)
method DeleteFile_AccessShouldBeDenied (line 189) | public override void DeleteFile_AccessShouldBeDenied(string path)
method ReadAllText_FileShouldNotBeFound (line 195) | public override void ReadAllText_FileShouldNotBeFound(string path)
method DeleteDirectory_DirectoryShouldNotBeFound (line 200) | public override void DeleteDirectory_DirectoryShouldNotBeFound(string ...
method DeleteDirectory_ShouldBeBlockedByProcess (line 205) | public override void DeleteDirectory_ShouldBeBlockedByProcess(string p...
method FileSize (line 210) | public override long FileSize(string path)
method ChangeMode (line 215) | public override void ChangeMode(string path, ushort mode)
method CreateFileWithoutClose (line 220) | public override void CreateFileWithoutClose(string path)
method OpenFileAndWriteWithoutClose (line 225) | public override void OpenFileAndWriteWithoutClose(string path, string ...
method RunProcess (line 230) | protected override string RunProcess(string command, string workingDir...
FILE: GVFS/GVFS.FunctionalTests/FileSystemRunners/ShellRunner.cs
class ShellRunner (line 6) | public abstract class ShellRunner : FileSystemRunner
method RunProcess (line 13) | protected virtual string RunProcess(string arguments, string workingDi...
FILE: GVFS/GVFS.FunctionalTests/FileSystemRunners/SystemIORunner.cs
class SystemIORunner (line 12) | public class SystemIORunner : FileSystemRunner
method FileExists (line 14) | public override bool FileExists(string path)
method MoveFile (line 19) | public override string MoveFile(string sourcePath, string targetPath)
method CreateFileWithoutClose (line 25) | public override void CreateFileWithoutClose(string path)
method OpenFileAndWriteWithoutClose (line 30) | public override void OpenFileAndWriteWithoutClose(string path, string ...
method MoveFileShouldFail (line 36) | public override void MoveFileShouldFail(string sourcePath, string targ...
method MoveFile_FileShouldNotBeFound (line 46) | public override void MoveFile_FileShouldNotBeFound(string sourcePath, ...
method ReplaceFile (line 51) | public override string ReplaceFile(string sourcePath, string targetPath)
method ReplaceFile_FileShouldNotBeFound (line 57) | public override void ReplaceFile_FileShouldNotBeFound(string sourcePat...
method ReplaceFile_AccessShouldBeDenied (line 62) | public override void ReplaceFile_AccessShouldBeDenied(string sourcePat...
method DeleteFile (line 69) | public override string DeleteFile(string path)
method DeleteFile_FileShouldNotBeFound (line 75) | public override void DeleteFile_FileShouldNotBeFound(string path)
method DeleteFile_AccessShouldBeDenied (line 81) | public override void DeleteFile_AccessShouldBeDenied(string path)
method ReadAllText (line 87) | public override string ReadAllText(string path)
method CreateEmptyFile (line 92) | public override void CreateEmptyFile(string path)
method CreateHardLink (line 99) | public override void CreateHardLink(string newLinkFilePath, string exi...
method WriteAllText (line 111) | public override void WriteAllText(string path, string contents)
method AppendAllText (line 116) | public override void AppendAllText(string path, string contents)
method WriteAllTextShouldFail (line 121) | public override void WriteAllTextShouldFail<ExceptionType>(string path...
method DirectoryExists (line 131) | public override bool DirectoryExists(string path)
method MoveDirectory (line 136) | public override void MoveDirectory(string sourcePath, string targetPath)
method RenameDirectory (line 141) | public override void RenameDirectory(string workingDirectory, string s...
method MoveDirectory_RequestShouldNotBeSupported (line 153) | public override void MoveDirectory_RequestShouldNotBeSupported(string ...
method MoveDirectory_TargetShouldBeInvalid (line 163) | public override void MoveDirectory_TargetShouldBeInvalid(string source...
method CreateDirectory (line 173) | public override void CreateDirectory(string path)
method DeleteDirectory (line 178) | public override string DeleteDirectory(string path)
method EnumerateDirectory (line 198) | public override string EnumerateDirectory(string path)
method DeleteDirectory_DirectoryShouldNotBeFound (line 203) | public override void DeleteDirectory_DirectoryShouldNotBeFound(string ...
method DeleteDirectory_ShouldBeBlockedByProcess (line 208) | public override void DeleteDirectory_ShouldBeBlockedByProcess(string p...
method ReadAllText_FileShouldNotBeFound (line 213) | public override void ReadAllText_FileShouldNotBeFound(string path)
method ChangeMode (line 218) | public override void ChangeMode(string path, ushort mode)
method FileSize (line 230) | public override long FileSize(string path)
method MoveFileEx (line 235) | [DllImport("kernel32", SetLastError = true)]
method MacCreateHardLink (line 238) | [DllImport("libc", EntryPoint = "link", SetLastError = true)]
method Chmod (line 241) | [DllImport("libc", EntryPoint = "chmod", SetLastError = true)]
method Rename (line 244) | [DllImport("libc", EntryPoint = "rename", SetLastError = true)]
method WindowsCreateHardLink (line 247) | [DllImport("kernel32.dll", EntryPoint = "CreateHardLink", SetLastError...
method RetryOnException (line 253) | private static void RetryOnException(Action action)
method ShouldFail (line 273) | private void ShouldFail<ExceptionType>(Action action) where ExceptionT...
FILE: GVFS/GVFS.FunctionalTests/GVFSTestConfig.cs
class GVFSTestConfig (line 5) | public static class GVFSTestConfig
FILE: GVFS/GVFS.FunctionalTests/GlobalSetup.cs
class GlobalSetup (line 10) | [SetUpFixture]
method RunBeforeAnyTests (line 13) | [OneTimeSetUp]
method RunAfterAllTests (line 18) | [OneTimeTearDown]
FILE: GVFS/GVFS.FunctionalTests/Program.cs
class Program (line 13) | public class Program
method Main (line 15) | public static void Main(string[] args)
method RunBeforeAnyTests (line 142) | private static void RunBeforeAnyTests()
FILE: GVFS/GVFS.FunctionalTests/Settings.cs
class Settings (line 7) | public static class Settings
type ValidateWorkingTreeMode (line 9) | public enum ValidateWorkingTreeMode
class Default (line 16) | public static class Default
method Initialize (line 33) | public static void Initialize()
FILE: GVFS/GVFS.FunctionalTests/Should/FileSystemShouldExtensions.cs
class FileSystemShouldExtensions (line 13) | public static class FileSystemShouldExtensions
method ShouldBeAFile (line 34) | public static FileAdapter ShouldBeAFile(this string path, FileSystemRu...
method ShouldBeAFile (line 39) | public static FileAdapter ShouldBeAFile(this FileSystemInfo fileSystem...
method ShouldBeADirectory (line 44) | public static DirectoryAdapter ShouldBeADirectory(this string path, Fi...
method ShouldBeADirectory (line 49) | public static DirectoryAdapter ShouldBeADirectory(this FileSystemInfo ...
method ShouldNotExistOnDisk (line 54) | public static string ShouldNotExistOnDisk(this string path, FileSystem...
class FileAdapter (line 61) | public class FileAdapter
method FileAdapter (line 68) | public FileAdapter(string path, FileSystemRunner runner)
method WithContents (line 80) | public string WithContents()
method WithContents (line 85) | public FileAdapter WithContents(string expectedContents)
method WithCaseMatchingName (line 91) | public FileAdapter WithCaseMatchingName(string expectedName)
method WithInfo (line 101) | public FileInfo WithInfo(DateTime creation, DateTime lastWrite, Date...
method WithInfo (line 111) | public FileInfo WithInfo(DateTime creation, DateTime lastWrite, Date...
method WithAttribute (line 118) | public FileInfo WithAttribute(FileAttributes attribute)
method WithoutAttribute (line 125) | public FileInfo WithoutAttribute(FileAttributes attribute)
class DirectoryAdapter (line 133) | public class DirectoryAdapter
method DirectoryAdapter (line 137) | public DirectoryAdapter(string path, FileSystemRunner runner)
method WithNoItems (line 149) | public void WithNoItems()
method WithNoItems (line 154) | public void WithNoItems(string searchPattern)
method WithOneItem (line 159) | public FileSystemInfo WithOneItem()
method WithItems (line 164) | public IEnumerable<FileSystemInfo> WithItems(int expectedCount)
method WithItems (line 171) | public IEnumerable<FileSystemInfo> WithItems()
method WithFiles (line 176) | public IEnumerable<FileInfo> WithFiles()
method WithDirectories (line 184) | public IEnumerable<DirectoryInfo> WithDirectories()
method WithItems (line 192) | public IEnumerable<FileSystemInfo> WithItems(string searchPattern)
method WithDeepStructure (line 200) | public DirectoryAdapter WithDeepStructure(
method WithCaseMatchingName (line 212) | public DirectoryAdapter WithCaseMatchingName(string expectedName)
method WithInfo (line 222) | public DirectoryInfo WithInfo(DateTime creation, DateTime lastWrite,...
method WithInfo (line 232) | public DirectoryInfo WithInfo(DateTime creation, DateTime lastWrite,...
method WithAttribute (line 248) | public DirectoryInfo WithAttribute(FileAttributes attribute)
method IsMatchedPath (line 255) | private static bool IsMatchedPath(FileSystemInfo info, string repoRo...
method CompareDirectories (line 297) | private static void CompareDirectories(
FILE: GVFS/GVFS.FunctionalTests/Tests/DiskLayoutVersionTests.cs
class DiskLayoutVersionTests (line 9) | [TestFixture]
method MountSucceedsIfMinorVersionHasAdvancedButNotMajorVersion (line 15) | [TestCase]
method MountFailsIfBeforeMinimumVersion (line 35) | [TestCase]
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/BasicFileSystemTests.cs
class BasicFileSystemTests (line 17) | [TestFixture]
method ShrinkFileContents (line 24) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method GrowFileContents (line 40) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method FilesAreBufferedAndCanBeFlushed (line 56) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method NewFileAttributesAreUpdated (line 83) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method NewFolderAttributesAreUpdated (line 110) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method ExpandedFileAttributesAreUpdated (line 136) | [TestCase]
method UnhydratedFolderAttributesAreUpdated (line 181) | [TestCase]
method CannotWriteToReadOnlyFile (line 202) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method ReadonlyCanBeSetAndUnset (line 229) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method ChangeVirtualNTFSFileNameCase (line 253) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method ChangeVirtualNTFSFileName (line 274) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method MoveVirtualNTFSFileToVirtualNTFSFolder (line 295) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method MoveWorkingDirectoryFileToDotGitFolder (line 325) | [TestCaseSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Runn...
method MoveDotGitFileToWorkingDirectoryFolder (line 347) | [TestCaseSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Runn...
method MoveVirtualNTFSFileToOverwriteVirtualNTFSFile (line 376) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method MoveVirtualNTFSFileToInvalidFolder (line 402) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method DeletedFilesCanBeImmediatelyRecreated (line 426) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method CanDeleteFilesWhileTheyAreOpen (line 447) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method CanDeleteHydratedFilesWhileTheyAreOpenForWrite (line 478) | [TestCase]
method ProjectedBlobFileTimesMatchHead (line 508) | [TestCase]
method ProjectedBlobFolderTimesMatchHead (line 531) | [TestCase]
method NonExistentItemBehaviorIsCorrect (line 554) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method RenameEmptyVirtualNTFSFolder (line 576) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method MoveVirtualNTFSFolderIntoVirtualNTFSFolder (line 598) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method RenameAndMoveVirtualNTFSFolderIntoVirtualNTFSFolder (line 634) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method MoveVirtualNTFSFolderTreeIntoVirtualNTFSFolder (line 671) | [TestCaseSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Runn...
method MoveDotGitFullFolderTreeToDotGitFullFolder (line 735) | [TestCaseSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Runn...
method DeleteIndexFileFails (line 800) | [TestCaseSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Runn...
method MoveVirtualNTFSFolderIntoInvalidFolder (line 809) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method CreateFileInheritsParentDirectoryAttributes (line 857) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method CreateDirectoryInheritsParentDirectoryAttributes (line 873) | [TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFo...
method VerifyExistenceAfterDeleteWhileOpen (line 889) | private void VerifyExistenceAfterDeleteWhileOpen(string filePath, File...
method SupportsPosixDelete (line 901) | private bool SupportsPosixDelete()
class FileRunnersAndFolders (line 920) | private class FileRunnersAndFolders
method ShouldNotExistOnDisk (line 973) | public static void ShouldNotExistOnDisk(GVFSFunctionalTestEnlistment...
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CacheServerTests.cs
class CacheServerTests (line 7) | [TestFixture]
method SettingGitConfigChangesCacheServer (line 13) | [TestCase]
method SetAndGetTests (line 22) | [TestCase]
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CloneTests.cs
class CloneTests (line 12) | [TestFixture]
method CloneInsideMountedEnlistment (line 17) | [TestCase]
method CloneInsideUnmountedEnlistment (line 23) | [TestCase]
method CloneWithLocalCachePathWithinSrc (line 31) | [TestCase]
method CloneToPathWithSpaces (line 49) | [TestCase]
method CloneCreatesCorrectFilesInRoot (line 56) | [TestCase]
method SubfolderCloneShouldFail (line 76) | private void SubfolderCloneShouldFail()
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DehydrateTests.cs
class DehydrateTests (line 16) | [TestFixture]
method DehydrateTests (line 27) | public DehydrateTests()
method TearDown (line 33) | [TearDown]
method DehydrateShouldExitWithoutConfirm (line 48) | [TestCase]
method DehydrateShouldSucceedInCommonCase (line 54) | [TestCase]
method FullDehydrateShouldExitWithoutConfirm (line 60) | [TestCase]
method FullDehydrateShouldSucceedInCommonCase (line 66) | [TestCase]
method DehydrateShouldFailOnUnmountedRepoWithStatus (line 72) | [TestCase]
method DehydrateShouldSucceedEvenIfObjectCacheIsDeleted (line 79) | [TestCase]
method DehydrateShouldBackupFiles (line 87) | [TestCase]
method DehydrateShouldFailIfLocalCacheNotInMetadata (line 109) | [TestCase]
method DehydrateShouldFailIfGitObjectsRootNotInMetadata (line 133) | [TestCase]
method DehydrateShouldFailOnWrongDiskLayoutVersion (line 157) | [TestCase]
method FolderDehydrateFolderThatWasEnumerated (line 184) | [TestCase]
method FolderDehydrateFolderWithFilesThatWerePlaceholders (line 202) | [TestCase]
method FolderDehydrateFolderWithFilesThatWereRead (line 222) | [TestCase]
method FolderDehydrateFolderWithFilesThatWereWrittenTo (line 240) | [TestCase]
method FolderDehydrateFolderThatWasDeleted (line 259) | [TestCase]
method FolderDehydrateFolderThatIsLocked (line 276) | [TestCase]
method FolderDehydrateFolderThatIsSubstringOfExistingFolder (line 298) | [TestCase]
method FolderDehydrateNestedFoldersChildBeforeParent (line 332) | [TestCase]
method FolderDehydrateNestedFoldersParentBeforeChild (line 356) | [TestCase]
method FolderDehydrateParentFolderInModifiedPathsShouldOutputMessage (line 380) | [TestCase]
method FolderDehydrateDirtyStatusShouldFail (line 394) | [TestCase]
method FolderDehydrateDirtyStatusWithNoStatusShouldFail (line 406) | [TestCase]
method FolderDehydrateCannotDehydrateDotGitFolder (line 418) | [TestCase]
method FolderDehydratePreviouslyDeletedFolders (line 425) | [TestCase]
method FolderDehydrateTombstone (line 459) | [TestCase]
method FolderDehydrateRelativePaths (line 474) | [TestCase]
method FolderDehydrateFolderThatDoesNotExist (line 498) | [TestCase]
method FolderDehydrateNewlyCreatedFolderAndFile (line 505) | [TestCase]
method PlaceholdersShouldContain (line 526) | private void PlaceholdersShouldContain(params string[] paths)
method PlaceholdersShouldNotContain (line 535) | private void PlaceholdersShouldNotContain(params string[] paths)
method GetPlaceholderDatabaseLines (line 544) | private string[] GetPlaceholderDatabaseLines()
method DirectoryShouldContain (line 550) | private void DirectoryShouldContain(string directory, params string[] ...
method CheckDehydratedFolderAfterUnmount (line 561) | private void CheckDehydratedFolderAfterUnmount(string path)
method DehydrateShouldSucceed (line 573) | private void DehydrateShouldSucceed(string[] expectedInOutput, bool co...
method DehydrateShouldFail (line 587) | private void DehydrateShouldFail(string[] expectedErrorMessages, bool ...
method RunDehydrateProcess (line 594) | private ProcessResult RunDehydrateProcess(bool confirm, bool noStatus,...
method OpenFolderHandle (line 629) | private SafeFileHandle OpenFolderHandle(string path)
method RunHandleProcess (line 641) | private string RunHandleProcess(string path)
class TestPath (line 660) | private class TestPath
method TestPath (line 662) | public TestPath(GVFSFunctionalTestEnlistment enlistment, string base...
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DiagnoseTests.cs
class DiagnoseTests (line 10) | [TestFixture]
method DiagnoseTests (line 17) | public DiagnoseTests()
method DiagnoseProducesZipFile (line 22) | [TestCase]
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSLockTests.cs
class GVFSLockTests (line 13) | [TestFixture]
method GVFSLockTests (line 18) | public GVFSLockTests()
type MoveFileFlags (line 23) | [Flags]
method GitCheckoutFailsOutsideLock (line 34) | [TestCase]
method LockPreventsRenameFromOutsideRootOnTopOfIndex (line 66) | [TestCase]
method LockPreventsRenameFromInsideWorkingTreeOnTopOfIndex (line 72) | [TestCase]
method LockPreventsRenameOfIndexLockOnTopOfIndex (line 78) | [TestCase]
method WindowsMoveFileEx (line 84) | [DllImport("kernel32.dll", EntryPoint = "MoveFileEx", SetLastError = t...
method POSIXRename (line 90) | [DllImport("libc", EntryPoint = "rename", SetLastError = true)]
method OverwritingIndexShouldFail (line 93) | private void OverwritingIndexShouldFail(string testFilePath)
method RenameAndOverwrite (line 113) | private bool RenameAndOverwrite(string oldPath, string newPath)
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSUpgradeReminderTests.cs
class UpgradeReminderTests (line 13) | [TestFixture]
method UpgradeReminderTests (line 27) | public UpgradeReminderTests()
method NoReminderWhenUpgradeNotAvailable (line 38) | [TestCase]
method RemindWhenUpgradeAvailable (line 53) | [TestCase]
method NoReminderForLeftOverDownloads (line 61) | [TestCase]
method UpgradeTimerScheduledOnServiceStart (line 77) | [TestCase]
method ReadNugetConfig (line 99) | private void ReadNugetConfig(out string feedUrl, out string feedName)
method DeleteNugetConfig (line 110) | private void DeleteNugetConfig()
method WriteNugetConfig (line 117) | private void WriteNugetConfig(string feedUrl, string feedName)
method ServiceLogContainsUpgradeMessaging (line 131) | private bool ServiceLogContainsUpgradeMessaging()
method EmptyDownloadDirectory (line 164) | private void EmptyDownloadDirectory()
method CreateUpgradeAvailableMarkerFile (line 176) | private void CreateUpgradeAvailableMarkerFile()
method SetUpgradeRing (line 188) | private void SetUpgradeRing(string value)
method RunUpgradeCommand (line 193) | private string RunUpgradeCommand()
method RunGVFS (line 198) | private string RunGVFS(string argument)
method RestartService (line 206) | private void RestartService()
method ReminderMessagingEnabled (line 212) | private bool ReminderMessagingEnabled()
method VerifyServiceRestartStopsReminder (line 232) | private void VerifyServiceRestartStopsReminder()
method VerifyUpgradeVerbStopsReminder (line 251) | private void VerifyUpgradeVerbStopsReminder()
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitBlockCommandsTests.cs
class GitBlockCommandsTests (line 7) | [TestFixture]
method GitBlockCommands (line 11) | [TestCase]
method CommandBlocked (line 29) | private void CommandBlocked(string command)
method CommandNotBlocked (line 37) | private void CommandNotBlocked(string command)
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitCorruptObjectTests.cs
class GitCorruptObjectTests (line 12) | [TestFixture]
method GitCorruptObjectTests (line 20) | public GitCorruptObjectTests()
method GitRequestsReplacementForAllNullObject (line 26) | [TestCase]
method GitRequestsReplacementForTruncatedObject (line 41) | [TestCase]
method GitRequestsReplacementForObjectCorruptedWithBadData (line 62) | [TestCase]
method RunGitDiffWithCorruptObject (line 76) | private void RunGitDiffWithCorruptObject(Action<string> corruptObject)
method RunGitCatFileWithCorruptObject (line 94) | private void RunGitCatFileWithCorruptObject(Action<string> corruptObject)
method RunGitResetHardWithCorruptObject (line 109) | private void RunGitResetHardWithCorruptObject(Action<string> corruptOb...
method RunGitCheckoutOnFileWithCorruptObject (line 126) | private void RunGitCheckoutOnFileWithCorruptObject(Action<string> corr...
method GetLooseObjectPath (line 143) | private string GetLooseObjectPath(string fileGitPath, out string sha)
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitFilesTests.cs
class GitFilesTests (line 14) | [TestFixtureSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Run...
method GitFilesTests (line 19) | public GitFilesTests(FileSystemRunner fileSystem)
method CreateFileTest (line 24) | [TestCase, Order(1)]
method CreateHardLinkTest (line 42) | [TestCase, Order(2)]
method CreateFileInFolderTest (line 62) | [TestCase, Order(3)]
method RenameEmptyFolderTest (line 82) | [TestCase, Order(4)]
method RenameFolderTest (line 102) | [TestCase, Order(5)]
method CaseOnlyRenameOfNewFolderKeepsModifiedPathsEntries (line 141) | [TestCase, Order(6)]
method ReadingFileDoesNotUpdateIndexOrModifiedPaths (line 163) | [TestCase, Order(7)]
method ModifiedFileWillGetAddedToModifiedPathsFile (line 190) | [TestCase, Order(8)]
method RenamedFileAddedToModifiedPathsFile (line 209) | [TestCase, Order(9)]
method RenamedFileAndOverwrittenTargetAddedToModifiedPathsFile (line 228) | [TestCase, Order(10)]
method DeletedFileAddedToModifiedPathsFile (line 249) | [TestCase, Order(11)]
method DeletedFolderAndChildrenAddedToToModifiedPathsFile (line 264) | [TestCase, Order(12)]
method FileRenamedOutOfRepoAddedToModifiedPathsAndSkipWorktreeBitCleared (line 296) | [TestCase, Order(13)]
method OverwrittenFileAddedToModifiedPathsAndSkipWorktreeBitCleared (line 315) | [TestCase, Order(14)]
method SupersededFileAddedToModifiedPathsAndSkipWorktreeBitCleared (line 335) | [TestCase, Order(15)]
method FileMovedFromOutsideRepoToInside (line 356) | [TestCase, Order(16)]
method FileMovedFromInsideRepoToOutside (line 374) | [TestCase, Order(17)]
method HardlinkFromOutsideRepoToInside (line 396) | [TestCase, Order(18)]
method HardlinkFromInsideRepoToOutside (line 415) | [TestCase, Order(19)]
method HardlinkInsideRepo (line 431) | [TestCase, Order(20)]
method HardlinkExistingFileInRepo (line 450) | [TestCase, Order(21)]
method SupersedeFile (line 468) | [DllImport("GVFS.NativeTests.dll", CharSet = CharSet.Unicode)]
method VerifyWorktreeBit (line 471) | private void VerifyWorktreeBit(string path, char expectedStatus)
class LsFilesStatus (line 480) | private static class LsFilesStatus
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitMoveRenameTests.cs
class GitMoveRenameTests (line 13) | [TestFixtureSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Run...
method GitMoveRenameTests (line 19) | public GitMoveRenameTests(FileSystemRunner fileSystem)
method GitStatus (line 24) | [TestCase, Order(1)]
method GitStatusAfterNewFile (line 34) | [TestCase, Order(2)]
method GitStatusAfterFileNameCaseChange (line 55) | [TestCase, Order(3)]
method GitStatusAfterFileRename (line 75) | [TestCase, Order(4)]
method GitStatusAndObjectAfterGitAdd (line 93) | [TestCase, Order(5)]
method GitStatusAfterUnstage (line 128) | [TestCase, Order(6)]
method GitStatusAfterFileDelete (line 147) | [TestCase, Order(7)]
method GitWithEnvironmentVariables (line 162) | [TestCase, Order(8)]
method GitStatusAfterRenameFileIntoRepo (line 181) | [TestCase, Order(9)]
method GitStatusAfterRenameFileOutOfRepo (line 207) | [TestCase, Order(10)]
method GitStatusAfterRenameFolderIntoRepo (line 223) | [TestCase, Order(11)]
method EnsureTestFileExists (line 250) | private void EnsureTestFileExists(string relativePath)
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitReadAndGitLockTests.cs
class GitReadAndGitLockTests (line 13) | [TestFixture]
method GitReadAndGitLockTests (line 20) | public GitReadAndGitLockTests()
method GitStatus (line 25) | [TestCase, Order(1)]
method GitLog (line 35) | [TestCase, Order(2)]
method GitBranch (line 41) | [TestCase, Order(3)]
method GitCommandWaitsWhileAnotherIsRunning (line 51) | [TestCase, Order(4)]
method GitAliasNamedAfterKnownCommandAcquiresLock (line 61) | [TestCase, Order(5)]
method GitAliasInSubfolderNamedAfterKnownCommandAcquiresLock (line 73) | [TestCase, Order(6)]
method ExternalLockHolderReportedWhenBackgroundTasksArePending (line 89) | [TestCase, Order(7)]
method OrphanedGVFSLockIsCleanedUp (line 106) | [TestCase, Order(8)]
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/HealthTests.cs
class HealthTests (line 14) | [TestFixture]
method AfterCloningRepoIsPerfectlyHealthy (line 17) | [TestCase, Order(0)]
method PlaceholdersChangeHealthScores (line 40) | [TestCase, Order(1)]
method ModifiedPathsChangeHealthScores (line 68) | [TestCase, Order(2)]
method TurnPlaceholdersIntoModifiedPaths (line 93) | [TestCase, Order(3)]
method FilterIntoDirectory (line 120) | [TestCase, Order(4)]
method HydratePlaceholder (line 140) | private void HydratePlaceholder(string filePath)
method HydrateFullFile (line 145) | private void HydrateFullFile(string filePath)
method ValidateHealthOutputValues (line 150) | private void ValidateHealthOutputValues(
method ValidateTargetDirectory (line 176) | private void ValidateTargetDirectory(string outputLine, string targetD...
method ValidateTotalFileInfo (line 187) | private void ValidateTotalFileInfo(string outputLine, int totalFiles, ...
method ValidateFastFileInfo (line 200) | private void ValidateFastFileInfo(string outputLine, int fastFiles, in...
method ValidateSlowFileInfo (line 213) | private void ValidateSlowFileInfo(string outputLine, int slowFiles, in...
method ValidateTotalHydration (line 226) | private void ValidateTotalHydration(string outputLine, int totalHydrat...
method ValidateSubDirectoryHealth (line 237) | private void ValidateSubDirectoryHealth(List<string> outputLines, List...
method ValidateEnlistmentStatus (line 253) | private void ValidateEnlistmentStatus(string outputLine, string status...
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs
class MountTests (line 17) | [TestFixture]
method MountTests (line 29) | public MountTests()
method SecondMountAttemptFails (line 37) | [TestCaseSource(typeof(MountSubfolders), MountSubfolders.MountFolders)]
method MountFailsOutsideEnlistment (line 43) | [TestCase]
method MountCopiesMissingReadObjectHook (line 49) | [TestCase]
method MountSetsCoreHooksPath (line 62) | [TestCase]
method MountMergesLocalPrePostHooksConfig (line 91) | [TestCase]
method MountChangesMountId (line 140) | [TestCase]
method MountFailsWhenNoOnDiskVersion (line 152) | [TestCase]
method MountFailsWhenNoLocalCacheRootInRepoMetadata (line 188) | [TestCase]
method MountFailsWhenNoGitObjectsRootInRepoMetadata (line 217) | [TestCase]
method MountRegeneratesAlternatesFileWhenMissingGitObjectsRoot (line 246) | [TestCase]
method MountRegeneratesAlternatesFileWhenMissingFromDisk (line 262) | [TestCase]
method MountCanProcessSavedBackgroundQueueTasks (line 278) | [TestCase]
method MountingARepositoryThatRequiresPlaceholderUpdatesWorks (line 303) | [TestCase]
method MountFailsAfterBreakingDowngrade (line 323) | [TestCaseSource(typeof(MountSubfolders), MountSubfolders.MountFolders)]
method MountFailsUpgradingFromInvalidUpgradePath (line 346) | [TestCaseSource(typeof(MountSubfolders), MountSubfolders.MountFolders)]
method ProjFS_CMDHangNoneActiveInstance (line 372) | [TestCase]
method MountShouldFail (line 394) | private void MountShouldFail(int expectedExitCode, string expectedErro...
method MountShouldFail (line 411) | private void MountShouldFail(string expectedErrorMessage, string mount...
class MountSubfolders (line 416) | private class MountSubfolders
method EnsureSubfoldersOnDisk (line 442) | public static void EnsureSubfoldersOnDisk(GVFSFunctionalTestEnlistme...
FILE: GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MoveRenameFileTests.cs
class MoveRenameFileTests (line 12) | [TestFixtureSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Run...
method MoveRenameFileTests (line 47) | public MoveRenameFileTests(FileSystemRunner fileSystem)
Condensed preview — 665 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,733K chars).
[
{
"path": ".azure-pipelines/release.yml",
"chars": 3135,
"preview": "# NOTE: this pipeline definition is not currently used to build releases of VFS for Git.\r\n# This is still done in the GV"
},
{
"path": ".editorconfig",
"chars": 130,
"preview": "# EditorConfig: https://EditorConfig.org\r\n\r\n# top-most EditorConfig file\r\nroot = true\r\n\r\n[*.cs]\r\ntrim_trailing_whitespac"
},
{
"path": ".gitattributes",
"chars": 227,
"preview": "###############################################################################\r\n# Do not normalize any line endings.\r\n#"
},
{
"path": ".github/dependabot.yml",
"chars": 723,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/workflows/build.yaml",
"chars": 9327,
"preview": "name: VFS for Git\n\nrun-name: ${{ inputs.run_name || 'VFS for Git' }}\n\non:\n pull_request:\n branches: [ master, releas"
},
{
"path": ".github/workflows/functional-tests.yaml",
"chars": 5910,
"preview": "name: Functional Tests\n\non:\n workflow_call:\n inputs:\n vfs_repository:\n description: 'Repository to downl"
},
{
"path": ".github/workflows/release-winget.yaml",
"chars": 830,
"preview": "name: \"release-winget\"\r\non:\r\n release:\r\n types: [released]\r\n\r\njobs:\r\n release:\r\n runs-on: windows-latest\r\n st"
},
{
"path": ".github/workflows/scripts/validate_release.ps1",
"chars": 3298,
"preview": "param(\r\n\t[Parameter(Mandatory=$true)]\r\n\t[string]$Tag,\r\n\r\n\t[Parameter(Mandatory=$true)]\r\n\t[string]$Repository\r\n)\r\n\r\nfunct"
},
{
"path": ".gitignore",
"chars": 3596,
"preview": "## Ignore Visual Studio temporary files, build results, and\r\n## files generated by popular Visual Studio add-ons.\r\n\r\n# V"
},
{
"path": ".vsconfig",
"chars": 502,
"preview": "{\r\n \"version\": \"1.0\",\r\n \"components\": [\r\n \"Microsoft.Component.MSBuild\",\r\n \"Microsoft.Net.Component.4.7.1.Target"
},
{
"path": "AuthoringTests.md",
"chars": 6875,
"preview": "# Authoring Tests\r\n\r\n## Functional Tests\r\n\r\n#### Runnable functional test projects\r\n\r\n- `GVFS.FunctionalTests`\r\n- `GVFS."
},
{
"path": "CONTRIBUTING.md",
"chars": 14299,
"preview": "# Contributing to VFS for Git\n\nThank you for taking the time to contribute!\n\n## Guidelines\n\n* [Code of Conduct](#code-of"
},
{
"path": "Directory.Build.props",
"chars": 2067,
"preview": "<Project>\r\n\r\n <!-- Import version props -->\r\n <Import Project=\"Version.props\" />\r\n\r\n <!-- Common project properties -"
},
{
"path": "Directory.Build.targets",
"chars": 567,
"preview": "<Project>\r\n\r\n <!-- Define common properties that rely on SDK/props-defined properties -->\r\n <PropertyGroup>\r\n <Vers"
},
{
"path": "Directory.Packages.props",
"chars": 1914,
"preview": "<Project>\r\n\r\n <PropertyGroup>\r\n <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>\r\n </PropertyG"
},
{
"path": "Directory.Solution.props",
"chars": 131,
"preview": "<Project>\r\n\r\n <!-- Import common build props for solution builds -->\r\n <Import Project=\"Directory.Build.props\" />\r\n\r\n<"
},
{
"path": "GVFS/FastFetch/CheckoutPrefetcher.cs",
"chars": 11465,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Http;\r\nusing GVFS.Common.Prefetch;\r\nusing GVFS.Common.Pre"
},
{
"path": "GVFS/FastFetch/CheckoutStage.cs",
"chars": 13142,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Prefetch.Git;\r\nusing GVFS."
},
{
"path": "GVFS/FastFetch/FastFetch.csproj",
"chars": 881,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n <PropertyGroup>\r\n <OutputType>Exe</OutputType>\r\n <TargetFramework>net471</T"
},
{
"path": "GVFS/FastFetch/FastFetchLibGit2Repo.cs",
"chars": 2199,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Prefetch.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collec"
},
{
"path": "GVFS/FastFetch/FastFetchVerb.cs",
"chars": 14499,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Http;\r\nusing GVFS.Common.Prefetch;\r\nu"
},
{
"path": "GVFS/FastFetch/GitEnlistment.cs",
"chars": 1475,
"preview": "using GVFS.Common;\r\nusing System;\r\nusing System.IO;\r\n\r\nnamespace FastFetch\r\n{\r\n public class GitEnlistment : Enlistm"
},
{
"path": "GVFS/FastFetch/Index.cs",
"chars": 29583,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Concurr"
},
{
"path": "GVFS/FastFetch/IndexLock.cs",
"chars": 3417,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Prefetch;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusi"
},
{
"path": "GVFS/FastFetch/NativeMethods.cs",
"chars": 4933,
"preview": "using GVFS.Common.Tracing;\r\nusing Microsoft.Win32.SafeHandles;\r\nusing System;\r\nusing System.ComponentModel;\r\nusing Syst"
},
{
"path": "GVFS/FastFetch/Program.cs",
"chars": 362,
"preview": "using CommandLine;\r\nusing GVFS.PlatformLoader;\r\n\r\nnamespace FastFetch\r\n{\r\n public class Program\r\n {\r\n publ"
},
{
"path": "GVFS/FastFetch/WorkingTree.cs",
"chars": 1350,
"preview": "using System;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Threading.Tasks;\r\nusing GVFS.Common;\r\n\r\nnamespace Fas"
},
{
"path": "GVFS/GVFS/CommandLine/CacheServerVerb.cs",
"chars": 5262,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.Http;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing Syste"
},
{
"path": "GVFS/GVFS/CommandLine/CacheVerb.cs",
"chars": 9056,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing "
},
{
"path": "GVFS/GVFS/CommandLine/CloneVerb.cs",
"chars": 35339,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Http;\r\n"
},
{
"path": "GVFS/GVFS/CommandLine/ConfigVerb.cs",
"chars": 5209,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace GVFS.CommandLine\r"
},
{
"path": "GVFS/GVFS/CommandLine/DehydrateVerb.cs",
"chars": 40417,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.Database;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.G"
},
{
"path": "GVFS/GVFS/CommandLine/DiagnoseVerb.cs",
"chars": 25575,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Http;\r\n"
},
{
"path": "GVFS/GVFS/CommandLine/GVFSVerb.cs",
"chars": 52853,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Http;\r\n"
},
{
"path": "GVFS/GVFS/CommandLine/HealthVerb.cs",
"chars": 9927,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.NamedPipes;\r\nusing GVFS.Common"
},
{
"path": "GVFS/GVFS/CommandLine/LogVerb.cs",
"chars": 5230,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\n\r\nnames"
},
{
"path": "GVFS/GVFS/CommandLine/MountVerb.cs",
"chars": 13888,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.Http;\r\nusing GVFS.Common.NamedPipes;\r\nusing GVFS.Common.Traci"
},
{
"path": "GVFS/GVFS/CommandLine/PrefetchVerb.cs",
"chars": 19980,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Http;\r"
},
{
"path": "GVFS/GVFS/CommandLine/RepairVerb.cs",
"chars": 10002,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.NamedPipes;\r\nusing GVFS.Common.Tracing;\r\nusing GVFS.DiskLayou"
},
{
"path": "GVFS/GVFS/CommandLine/ServiceVerb.cs",
"chars": 7958,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.NamedPipes;\r\nusing System;\r\nus"
},
{
"path": "GVFS/GVFS/CommandLine/SparseVerb.cs",
"chars": 30024,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.Database;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.G"
},
{
"path": "GVFS/GVFS/CommandLine/StatusVerb.cs",
"chars": 2139,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.NamedPipes;\r\n\r\nnamespace GVFS.CommandLine\r\n{\r\n [Verb(Statu"
},
{
"path": "GVFS/GVFS/CommandLine/UnmountVerb.cs",
"chars": 11220,
"preview": "using CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.NamedPipes;\r\nusing System.Diagnostics;\r\n\r\nnamespace GVFS.Comm"
},
{
"path": "GVFS/GVFS/CommandLine/UpgradeVerb.cs",
"chars": 1500,
"preview": "using CommandLine;\r\nusing System;\r\n\r\nnamespace GVFS.CommandLine\r\n{\r\n [Verb(UpgradeVerbName, HelpText = \"Checks for ne"
},
{
"path": "GVFS/GVFS/GVFS.csproj",
"chars": 884,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n <PropertyGroup>\r\n <OutputType>Exe</OutputType>\r\n <TargetFramework>net471</T"
},
{
"path": "GVFS/GVFS/InternalsVisibleTo.cs",
"chars": 93,
"preview": "using System.Runtime.CompilerServices;\r\n\r\n[assembly: InternalsVisibleTo(\"GVFS.UnitTests\")]\r\n"
},
{
"path": "GVFS/GVFS/Program.cs",
"chars": 4599,
"preview": "using CommandLine;\r\nusing GVFS.CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.PlatformLoader;\r\nusing System;\r\nusing System"
},
{
"path": "GVFS/GVFS/RepairJobs/BackgroundOperationDatabaseRepairJob.cs",
"chars": 1472,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing GVFS.Virtualization.Background;\r\nu"
},
{
"path": "GVFS/GVFS/RepairJobs/BlobSizeDatabaseRepairJob.cs",
"chars": 2160,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.Database;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing GVFS."
},
{
"path": "GVFS/GVFS/RepairJobs/GitConfigRepairJob.cs",
"chars": 5383,
"preview": "using GVFS.CommandLine;\r\nusing GVFS.Common;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System.Collectio"
},
{
"path": "GVFS/GVFS/RepairJobs/GitHeadRepairJob.cs",
"chars": 6944,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Generic"
},
{
"path": "GVFS/GVFS/RepairJobs/GitIndexRepairJob.cs",
"chars": 2374,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System.Collections.Generic;\r\nusing System"
},
{
"path": "GVFS/GVFS/RepairJobs/RepairJob.cs",
"chars": 4880,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing GVFS.Virtualization.Projection;\r\nu"
},
{
"path": "GVFS/GVFS/RepairJobs/RepoMetadataDatabaseRepairJob.cs",
"chars": 1199,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.Tracing;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\n\r\nnamespace GVFS.R"
},
{
"path": "GVFS/GVFS/RepairJobs/VFSForGitDatabaseRepairJob.cs",
"chars": 1204,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.Database;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing Syste"
},
{
"path": "GVFS/GVFS.Common/AzDevOpsOrgFromNuGetFeed.cs",
"chars": 1865,
"preview": "using System.Text.RegularExpressions;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public class AzDevOpsOrgFromNuGetFeed\r\n {\r\n "
},
{
"path": "GVFS/GVFS.Common/ConcurrentHashSet.cs",
"chars": 1372,
"preview": "using System.Collections;\r\nusing System.Collections.Concurrent;\r\nusing System.Collections.Generic;\r\n\r\nnamespace GVFS.Co"
},
{
"path": "GVFS/GVFS.Common/ConsoleHelper.cs",
"chars": 4897,
"preview": "using System;\r\nusing System.IO;\r\nusing System.Runtime.InteropServices;\r\nusing System.Threading;\r\n\r\nnamespace GVFS.Commo"
},
{
"path": "GVFS/GVFS.Common/Database/GVFSDatabase.cs",
"chars": 6743,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Concurrent;\r\nusing S"
},
{
"path": "GVFS/GVFS.Common/Database/GVFSDatabaseException.cs",
"chars": 269,
"preview": "using System;\r\n\r\nnamespace GVFS.Common.Database\r\n{\r\n public class GVFSDatabaseException : Exception\r\n {\r\n "
},
{
"path": "GVFS/GVFS.Common/Database/IDbCommandExtensions.cs",
"chars": 629,
"preview": "using System.Data;\r\n\r\nnamespace GVFS.Common.Database\r\n{\r\n /// <summary>\r\n /// Extension methods for the IDbComman"
},
{
"path": "GVFS/GVFS.Common/Database/IDbConnectionFactory.cs",
"chars": 283,
"preview": "using System.Data;\r\n\r\nnamespace GVFS.Common.Database\r\n{\r\n /// <summary>\r\n /// Interface used to open a new connec"
},
{
"path": "GVFS/GVFS.Common/Database/IGVFSConnectionPool.cs",
"chars": 256,
"preview": "using System.Data;\r\n\r\nnamespace GVFS.Common.Database\r\n{\r\n /// <summary>\r\n /// Interface for getting a pooled data"
},
{
"path": "GVFS/GVFS.Common/Database/IPlaceholderCollection.cs",
"chars": 879,
"preview": "using System.Collections.Generic;\r\n\r\nnamespace GVFS.Common.Database\r\n{\r\n /// <summary>\r\n /// Interface for intera"
},
{
"path": "GVFS/GVFS.Common/Database/IPlaceholderData.cs",
"chars": 371,
"preview": "namespace GVFS.Common.Database\r\n{\r\n /// <summary>\r\n /// Interface for holding placeholder information\r\n /// </"
},
{
"path": "GVFS/GVFS.Common/Database/ISparseCollection.cs",
"chars": 279,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nnamespace GVFS.Common.Database\r\n{\r\n public i"
},
{
"path": "GVFS/GVFS.Common/Database/PlaceholderTable.cs",
"chars": 12603,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Data;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common.Databas"
},
{
"path": "GVFS/GVFS.Common/Database/SparseTable.cs",
"chars": 3711,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Data;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common.Databas"
},
{
"path": "GVFS/GVFS.Common/Database/SqliteDatabase.cs",
"chars": 2905,
"preview": "using GVFS.Common.FileSystem;\r\nusing Microsoft.Data.Sqlite;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Sy"
},
{
"path": "GVFS/GVFS.Common/DiskLayoutUpgrades/DiskLayoutUpgrade.cs",
"chars": 16144,
"preview": "using GVFS.Common;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nu"
},
{
"path": "GVFS/GVFS.Common/DiskLayoutUpgrades/DiskLayoutUpgrade_SqlitePlaceholders.cs",
"chars": 2186,
"preview": "using GVFS.Common.Database;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing GVFS.DiskLayoutUpgrades;\r"
},
{
"path": "GVFS/GVFS.Common/DiskLayoutUpgrades/DiskLayoutVersion.cs",
"chars": 1349,
"preview": "namespace GVFS.Common\r\n{\r\n public class DiskLayoutVersion\r\n {\r\n public DiskLayoutVersion(int currentMajorV"
},
{
"path": "GVFS/GVFS.Common/Enlistment.cs",
"chars": 4464,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing System;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common\r\n{\r\n "
},
{
"path": "GVFS/GVFS.Common/EpochConverter.cs",
"chars": 547,
"preview": "using System;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public static class EpochConverter\r\n {\r\n private static readon"
},
{
"path": "GVFS/GVFS.Common/FileBasedCollection.cs",
"chars": 18383,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Syst"
},
{
"path": "GVFS/GVFS.Common/FileBasedCollectionException.cs",
"chars": 273,
"preview": "using System;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public class FileBasedCollectionException : Exception\r\n {\r\n pu"
},
{
"path": "GVFS/GVFS.Common/FileBasedDictionary.cs",
"chars": 4963,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing Newtonsoft.Json;\r\nusing System;\r\nusing System.Collecti"
},
{
"path": "GVFS/GVFS.Common/FileBasedLock.cs",
"chars": 1538,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public abstrac"
},
{
"path": "GVFS/GVFS.Common/FileSystem/DirectoryItemInfo.cs",
"chars": 268,
"preview": "namespace GVFS.Common.FileSystem\r\n{\r\n public class DirectoryItemInfo\r\n {\r\n public string Name { get; set; "
},
{
"path": "GVFS/GVFS.Common/FileSystem/FileProperties.cs",
"chars": 1195,
"preview": "using System;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common.FileSystem\r\n{\r\n public class FileProperties\r\n {\r\n "
},
{
"path": "GVFS/GVFS.Common/FileSystem/FlushToDiskFileStream.cs",
"chars": 915,
"preview": "using System.IO;\r\n\r\nnamespace GVFS.Common.FileSystem\r\n{\r\n public class FlushToDiskFileStream : FileStream\r\n {\r\n "
},
{
"path": "GVFS/GVFS.Common/FileSystem/HooksInstaller.cs",
"chars": 10995,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diag"
},
{
"path": "GVFS/GVFS.Common/FileSystem/IKernelDriver.cs",
"chars": 923,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common.FileSystem\r\n{\r\n public interfac"
},
{
"path": "GVFS/GVFS.Common/FileSystem/IPlatformFileSystem.cs",
"chars": 1211,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\n\r\nnamespace GVFS.Common.FileSystem\r\n{\r\n public interface IPlatformFileSys"
},
{
"path": "GVFS/GVFS.Common/FileSystem/PhysicalFileSystem.cs",
"chars": 19093,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing Syste"
},
{
"path": "GVFS/GVFS.Common/GVFS.Common.csproj",
"chars": 1176,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n <PropertyGroup>\r\n <TargetFramework>net471</TargetFramework>\r\n <AllowUnsafe"
},
{
"path": "GVFS/GVFS.Common/GVFSConstants.cs",
"chars": 14497,
"preview": "using System.IO;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public static partial class GVFSConstants\r\n {\r\n public const"
},
{
"path": "GVFS/GVFS.Common/GVFSContext.cs",
"chars": 1441,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\n\r\nnamespace GVFS.Comm"
},
{
"path": "GVFS/GVFS.Common/GVFSEnlistment.Shared.cs",
"chars": 9923,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Security;\r"
},
{
"path": "GVFS/GVFS.Common/GVFSEnlistment.cs",
"chars": 15598,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.NamedPipes;\r\nusing GVFS.Common.Tracing;\r\nusing "
},
{
"path": "GVFS/GVFS.Common/GVFSLock.Shared.cs",
"chars": 7181,
"preview": "using GVFS.Common.NamedPipes;\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Threading;\r\n\r\nnamespace GVFS.Comm"
},
{
"path": "GVFS/GVFS.Common/GVFSLock.cs",
"chars": 17834,
"preview": "using GVFS.Common.NamedPipes;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Thread"
},
{
"path": "GVFS/GVFS.Common/GVFSPlatform.cs",
"chars": 9240,
"preview": "using GVFS.Common.FileSystem;\nusing GVFS.Common.Git;\nusing GVFS.Common.Tracing;\nusing System;\nusing System.Collections.G"
},
{
"path": "GVFS/GVFS.Common/Git/DiffTreeResult.cs",
"chars": 10412,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r"
},
{
"path": "GVFS/GVFS.Common/Git/EndianHelper.cs",
"chars": 1445,
"preview": "namespace GVFS.Common.Git\r\n{\r\n public static class EndianHelper\r\n {\r\n public static short Swap(short sourc"
},
{
"path": "GVFS/GVFS.Common/Git/GVFSGitObjects.cs",
"chars": 9891,
"preview": "using GVFS.Common.Http;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Concurrent;\r\nusing System."
},
{
"path": "GVFS/GVFS.Common/Git/GitAuthentication.cs",
"chars": 16094,
"preview": "using GVFS.Common.Http;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Net"
},
{
"path": "GVFS/GVFS.Common/Git/GitConfigHelper.cs",
"chars": 6067,
"preview": "using System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n /// <summary>\r\n /// Helper met"
},
{
"path": "GVFS/GVFS.Common/Git/GitConfigSetting.cs",
"chars": 1093,
"preview": "using System.Collections.Generic;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n public class GitConfigSetting\r\n {\r\n pu"
},
{
"path": "GVFS/GVFS.Common/Git/GitCoreGVFSFlags.cs",
"chars": 2924,
"preview": "using System;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n [Flags]\r\n public enum GitCoreGVFSFlags\r\n {\r\n // GVFS_SKI"
},
{
"path": "GVFS/GVFS.Common/Git/GitIndexGenerator.cs",
"chars": 10744,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Concurrent;\r\nusing System.Collections.Generic;\r\nusi"
},
{
"path": "GVFS/GVFS.Common/Git/GitObjectContentType.cs",
"chars": 171,
"preview": "namespace GVFS.Common.Git\r\n{\r\n public enum GitObjectContentType\r\n {\r\n None,\r\n LooseObject,\r\n "
},
{
"path": "GVFS/GVFS.Common/Git/GitObjects.cs",
"chars": 53634,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Http;\r\nusing GVFS.Common.NetworkStreams;\r\nusing GVFS.Common.Tracing;\r\n"
},
{
"path": "GVFS/GVFS.Common/Git/GitOid.cs",
"chars": 408,
"preview": "using System.Runtime.InteropServices;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n [StructLayout(LayoutKind.Sequential)]\r\n p"
},
{
"path": "GVFS/GVFS.Common/Git/GitPathConverter.cs",
"chars": 1944,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n public static"
},
{
"path": "GVFS/GVFS.Common/Git/GitProcess.cs",
"chars": 49108,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Syste"
},
{
"path": "GVFS/GVFS.Common/Git/GitRefs.cs",
"chars": 4245,
"preview": "using System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n public c"
},
{
"path": "GVFS/GVFS.Common/Git/GitRepo.cs",
"chars": 10687,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.IO;\r\nusing System.IO.Compression"
},
{
"path": "GVFS/GVFS.Common/Git/GitSsl.cs",
"chars": 10561,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Security.Cryptogra"
},
{
"path": "GVFS/GVFS.Common/Git/GitVersion.cs",
"chars": 7827,
"preview": "using System;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n public class GitVersion\r\n {\r\n public GitVersion(int major, "
},
{
"path": "GVFS/GVFS.Common/Git/HashingStream.cs",
"chars": 3361,
"preview": "using System;\r\nusing System.IO;\r\nusing System.Security.Cryptography;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n public class "
},
{
"path": "GVFS/GVFS.Common/Git/ICredentialStore.cs",
"chars": 470,
"preview": "using GVFS.Common.Tracing;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n public interface ICredentialStore\r\n {\r\n bool "
},
{
"path": "GVFS/GVFS.Common/Git/IGitInstallation.cs",
"chars": 171,
"preview": "namespace GVFS.Common.Git\r\n{\r\n public interface IGitInstallation\r\n {\r\n bool GitExists(string gitBinPath);\r"
},
{
"path": "GVFS/GVFS.Common/Git/LibGit2Exception.cs",
"chars": 436,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;"
},
{
"path": "GVFS/GVFS.Common/Git/LibGit2Repo.cs",
"chars": 23039,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Runtime.In"
},
{
"path": "GVFS/GVFS.Common/Git/LibGit2RepoInvoker.cs",
"chars": 3519,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Threading;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n public class Li"
},
{
"path": "GVFS/GVFS.Common/Git/NoOpStream.cs",
"chars": 986,
"preview": "using System;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n public class NoOpStream : Stream\r\n {\r\n p"
},
{
"path": "GVFS/GVFS.Common/Git/RefLogEntry.cs",
"chars": 1322,
"preview": "namespace GVFS.Common.Git\r\n{\r\n public class RefLogEntry\r\n {\r\n public RefLogEntry(string sourceSha, string "
},
{
"path": "GVFS/GVFS.Common/Git/RequiredGitConfig.cs",
"chars": 10234,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n /// <summary>\r\n "
},
{
"path": "GVFS/GVFS.Common/Git/Sha1Id.cs",
"chars": 7006,
"preview": "using System;\r\nusing System.Runtime.InteropServices;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n [StructLayout(LayoutKind.Expl"
},
{
"path": "GVFS/GVFS.Common/Git/SideChannelStream.cs",
"chars": 1637,
"preview": "using System;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common.Git\r\n{\r\n /// <summary>\r\n /// As you read from a SideChan"
},
{
"path": "GVFS/GVFS.Common/GitCommandLineParser.cs",
"chars": 6383,
"preview": "using System;\r\nusing System.Linq;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public class GitCommandLineParser\r\n {\r\n pr"
},
{
"path": "GVFS/GVFS.Common/GitStatusCache.cs",
"chars": 30598,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.NamedPipes;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Componen"
},
{
"path": "GVFS/GVFS.Common/GitStatusCacheConfig.cs",
"chars": 3407,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Linq;\r\n\r\nnamespace GVFS.Common\r\n{\r\n "
},
{
"path": "GVFS/GVFS.Common/HealthCalculator/EnlistmentHealthCalculator.cs",
"chars": 9204,
"preview": "using System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace GVFS.Common\r\n{\r\n /// <summary>\r\n /// Class res"
},
{
"path": "GVFS/GVFS.Common/HealthCalculator/EnlistmentHealthData.cs",
"chars": 1856,
"preview": "using System.Collections.Generic;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public class EnlistmentHealthData\r\n {\r\n pu"
},
{
"path": "GVFS/GVFS.Common/HealthCalculator/EnlistmentHydrationSummary.cs",
"chars": 10011,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\n"
},
{
"path": "GVFS/GVFS.Common/HealthCalculator/EnlistmentPathData.cs",
"chars": 9544,
"preview": "using GVFS.Common.Database;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.NamedPipes;\r\nusin"
},
{
"path": "GVFS/GVFS.Common/HealthCalculator/HydrationStatusCircuitBreaker.cs",
"chars": 6393,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common\r\n{\r\n /// <summary>\r\n /// Trac"
},
{
"path": "GVFS/GVFS.Common/HeartbeatThread.cs",
"chars": 2588,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Threading;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public class Heartb"
},
{
"path": "GVFS/GVFS.Common/Http/CacheServerInfo.cs",
"chars": 2149,
"preview": "using Newtonsoft.Json;\r\nusing System;\r\n\r\nnamespace GVFS.Common.Http\r\n{\r\n public class CacheServerInfo\r\n {\r\n "
},
{
"path": "GVFS/GVFS.Common/Http/CacheServerResolver.cs",
"chars": 6073,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Linq;\r\n\r\nnamespace GVFS.Common.Http\r\n{\r"
},
{
"path": "GVFS/GVFS.Common/Http/ConfigHttpRequestor.cs",
"chars": 4100,
"preview": "using GVFS.Common.Tracing;\r\nusing Newtonsoft.Json;\r\nusing System;\r\nusing System.Net;\r\nusing System.Net.Http;\r\nusing Sys"
},
{
"path": "GVFS/GVFS.Common/Http/GitEndPointResponseData.cs",
"chars": 5594,
"preview": "using GVFS.Common.Git;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Net;\r\nusing Sy"
},
{
"path": "GVFS/GVFS.Common/Http/GitObjectsHttpException.cs",
"chars": 346,
"preview": "using System;\r\nusing System.Net;\r\n\r\nnamespace GVFS.Common.Http\r\n{\r\n public class GitObjectsHttpException : Exception"
},
{
"path": "GVFS/GVFS.Common/Http/GitObjectsHttpRequestor.cs",
"chars": 16118,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing Newtonsoft.Json;\r\nusing System;\r\nusing System.Collections.Gen"
},
{
"path": "GVFS/GVFS.Common/Http/HttpRequestor.cs",
"chars": 20853,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diag"
},
{
"path": "GVFS/GVFS.Common/IDiskLayoutUpgradeData.cs",
"chars": 318,
"preview": "using GVFS.DiskLayoutUpgrades;\r\nusing System;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public interface IDiskLayoutUpgradeData\r"
},
{
"path": "GVFS/GVFS.Common/IHeartBeatMetadataProvider.cs",
"chars": 196,
"preview": "using GVFS.Common.Tracing;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public interface IHeartBeatMetadataProvider\r\n {\r\n "
},
{
"path": "GVFS/GVFS.Common/IProcessRunner.cs",
"chars": 348,
"preview": "namespace GVFS.Common\n{\n /// <summary>\n /// Interface around process helper methods. This is to enable\n /// tes"
},
{
"path": "GVFS/GVFS.Common/InternalVerbParameters.cs",
"chars": 1123,
"preview": "using Newtonsoft.Json;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public class InternalVerbParameters\r\n {\r\n public Inte"
},
{
"path": "GVFS/GVFS.Common/InternalsVisibleTo.cs",
"chars": 93,
"preview": "using System.Runtime.CompilerServices;\r\n\r\n[assembly: InternalsVisibleTo(\"GVFS.UnitTests\")]\r\n"
},
{
"path": "GVFS/GVFS.Common/InvalidRepoException.cs",
"chars": 204,
"preview": "using System;\n\nnamespace GVFS.Common\n{\n public class InvalidRepoException : Exception\n {\n public InvalidRe"
},
{
"path": "GVFS/GVFS.Common/LegacyPlaceholderListDatabase.cs",
"chars": 17169,
"preview": "using GVFS.Common.Database;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Col"
},
{
"path": "GVFS/GVFS.Common/LocalCacheResolver.cs",
"chars": 15297,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Http;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collect"
},
{
"path": "GVFS/GVFS.Common/LocalGVFSConfig.cs",
"chars": 4265,
"preview": "using GVFS.Common.FileSystem;\r\nusing System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public"
},
{
"path": "GVFS/GVFS.Common/Maintenance/GitMaintenanceQueue.cs",
"chars": 3891,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Concurrent;\r\nusing System.IO;\r\nusing System.Threadi"
},
{
"path": "GVFS/GVFS.Common/Maintenance/GitMaintenanceScheduler.cs",
"chars": 2644,
"preview": "using GVFS.Common.Git;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Threading;\r\n\r\nnamespace GVFS.Com"
},
{
"path": "GVFS/GVFS.Common/Maintenance/GitMaintenanceStep.cs",
"chars": 12938,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collecti"
},
{
"path": "GVFS/GVFS.Common/Maintenance/GitProcessChecker.cs",
"chars": 518,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\n\r\nnamespace GVFS.Commo"
},
{
"path": "GVFS/GVFS.Common/Maintenance/LooseObjectsStep.cs",
"chars": 10900,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collecti"
},
{
"path": "GVFS/GVFS.Common/Maintenance/PackfileMaintenanceStep.cs",
"chars": 8840,
"preview": "using GVFS.Common.FileSystem;\nusing GVFS.Common.Git;\nusing GVFS.Common.Tracing;\nusing System;\nusing System.Collections."
},
{
"path": "GVFS/GVFS.Common/Maintenance/PostFetchStep.cs",
"chars": 3333,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System.Collections.Generic;\r\nu"
},
{
"path": "GVFS/GVFS.Common/Maintenance/PrefetchStep.cs",
"chars": 17098,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.NamedPipes;\r\nusing GVFS.Common.Tracing;\r\nusing"
},
{
"path": "GVFS/GVFS.Common/MissingTreeTracker.cs",
"chars": 12592,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing GVFS.Common.Tracing;\r\n\r\nnamespace GVFS.Commo"
},
{
"path": "GVFS/GVFS.Common/ModifiedPathsDatabase.cs",
"chars": 9781,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tr"
},
{
"path": "GVFS/GVFS.Common/NamedPipes/AllowAllLocksNamedPipeServer.cs",
"chars": 2205,
"preview": "using GVFS.Common.Tracing;\r\n\r\nnamespace GVFS.Common.NamedPipes\r\n{\r\n public class AllowAllLocksNamedPipeServer\r\n {"
},
{
"path": "GVFS/GVFS.Common/NamedPipes/BrokenPipeException.cs",
"chars": 287,
"preview": "using System;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common.NamedPipes\r\n{\r\n public class BrokenPipeException : Exceptio"
},
{
"path": "GVFS/GVFS.Common/NamedPipes/HydrationStatusNamedPipeMessages.cs",
"chars": 4257,
"preview": "using System;\r\n\r\nnamespace GVFS.Common.NamedPipes\r\n{\r\n public static partial class NamedPipeMessages\r\n {\r\n "
},
{
"path": "GVFS/GVFS.Common/NamedPipes/LockNamedPipeMessages.cs",
"chars": 18224,
"preview": "using System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace GVFS.Common.NamedPipes\r\n{\r\n /// <summary>\r\n /// Def"
},
{
"path": "GVFS/GVFS.Common/NamedPipes/NamedPipeClient.cs",
"chars": 3681,
"preview": "using System;\r\nusing System.IO;\r\nusing System.IO.Pipes;\r\n\r\nnamespace GVFS.Common.NamedPipes\r\n{\r\n public class NamedP"
},
{
"path": "GVFS/GVFS.Common/NamedPipes/NamedPipeMessages.cs",
"chars": 15072,
"preview": "using Newtonsoft.Json;\r\nusing System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace GVFS.Common.NamedPipes\r\n{\r\n ///"
},
{
"path": "GVFS/GVFS.Common/NamedPipes/NamedPipeServer.cs",
"chars": 9120,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.IO;\r\nusing System.IO.Pipes;\r\nusing System.Threading;\r\n\r\nnamespa"
},
{
"path": "GVFS/GVFS.Common/NamedPipes/NamedPipeStreamReader.cs",
"chars": 2571,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace "
},
{
"path": "GVFS/GVFS.Common/NamedPipes/NamedPipeStreamWriter.cs",
"chars": 652,
"preview": "using System.IO;\r\nusing System.Text;\r\n\r\nnamespace GVFS.Common.NamedPipes\r\n{\r\n public class NamedPipeStreamWriter\r\n "
},
{
"path": "GVFS/GVFS.Common/NamedPipes/PipeNameLengthException.cs",
"chars": 233,
"preview": "using System;\r\n\r\nnamespace GVFS.Common.NamedPipes\r\n{\r\n public class PipeNameLengthException : Exception\r\n {\r\n "
},
{
"path": "GVFS/GVFS.Common/NamedPipes/UnstageNamedPipeMessages.cs",
"chars": 733,
"preview": "namespace GVFS.Common.NamedPipes\r\n{\r\n public static partial class NamedPipeMessages\r\n {\r\n public static cl"
},
{
"path": "GVFS/GVFS.Common/NativeMethods.Shared.cs",
"chars": 7275,
"preview": "using Microsoft.Win32.SafeHandles;\r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.Runtime"
},
{
"path": "GVFS/GVFS.Common/NativeMethods.cs",
"chars": 13385,
"preview": "using Microsoft.Win32.SafeHandles;\r\nusing System;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.Runtime"
},
{
"path": "GVFS/GVFS.Common/NetworkStreams/BatchedLooseObjectDeserializer.cs",
"chars": 4775,
"preview": "using System;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace GVFS.Common.NetworkStreams\r\n{\r\n "
},
{
"path": "GVFS/GVFS.Common/NetworkStreams/PrefetchPacksDeserializer.cs",
"chars": 4258,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Text;\r\n\r\nnamespace"
},
{
"path": "GVFS/GVFS.Common/NetworkStreams/RestrictedStream.cs",
"chars": 3657,
"preview": "using System;\nusing System.IO;\n\nnamespace GVFS.Common.NetworkStreams\n{\n /// <summary>\n /// Stream wrapper for a l"
},
{
"path": "GVFS/GVFS.Common/OrgInfoApiClient.cs",
"chars": 2282,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Net.Http;\r\nusing System.Text;\r\nusing "
},
{
"path": "GVFS/GVFS.Common/Paths.Shared.cs",
"chars": 1580,
"preview": "using System;\r\nusing System.IO;\r\nusing System.Linq;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public static class Paths\r\n {\r\n"
},
{
"path": "GVFS/GVFS.Common/Prefetch/BlobPrefetcher.cs",
"chars": 26566,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Http;\r\nusing GVFS.Common.Prefetch.Git;\r\nusing "
},
{
"path": "GVFS/GVFS.Common/Prefetch/Git/DiffHelper.cs",
"chars": 18920,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Concurrent;\r\nusing System.C"
},
{
"path": "GVFS/GVFS.Common/Prefetch/Git/PathWithMode.cs",
"chars": 788,
"preview": "using System;\r\n\r\nnamespace GVFS.Common.Prefetch.Git\r\n{\r\n public class PathWithMode\r\n {\r\n public PathWithMo"
},
{
"path": "GVFS/GVFS.Common/Prefetch/Git/PrefetchGitObjects.cs",
"chars": 448,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Git;\r\nusing GVFS.Common.Http;\r\nusing GVFS.Common.Tracing;\r\n\r\nnamespace"
},
{
"path": "GVFS/GVFS.Common/Prefetch/Pipeline/BatchObjectDownloadStage.cs",
"chars": 10472,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Http;\r\nusing GVFS.Common.NetworkStreams;\r\nusing GVFS.Common.Prefetch.Pipeline"
},
{
"path": "GVFS/GVFS.Common/Prefetch/Pipeline/Data/BlobDownloadRequest.cs",
"chars": 674,
"preview": "using System.Collections.Generic;\r\nusing System.Threading;\r\n\r\nnamespace GVFS.Common.Prefetch.Pipeline.Data\r\n{\r\n publ"
},
{
"path": "GVFS/GVFS.Common/Prefetch/Pipeline/Data/IndexPackRequest.cs",
"chars": 423,
"preview": "namespace GVFS.Common.Prefetch.Pipeline.Data\r\n{\r\n public class IndexPackRequest\r\n {\r\n public IndexPackRequ"
},
{
"path": "GVFS/GVFS.Common/Prefetch/Pipeline/Data/TreeSearchRequest.cs",
"chars": 468,
"preview": "namespace GVFS.Common.Prefetch.Pipeline.Data\r\n{\r\n public class SearchTreeRequest\r\n {\r\n public SearchTreeRe"
},
{
"path": "GVFS/GVFS.Common/Prefetch/Pipeline/FindBlobsStage.cs",
"chars": 3134,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Prefetch.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System.Collections.Concurren"
},
{
"path": "GVFS/GVFS.Common/Prefetch/Pipeline/HydrateFilesStage.cs",
"chars": 2709,
"preview": "using GVFS.Common.Prefetch.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System.Collections.Concurrent;\r\nusing System.Collect"
},
{
"path": "GVFS/GVFS.Common/Prefetch/Pipeline/IndexPackStage.cs",
"chars": 2995,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Prefetch.Pipeline.Data;\r\nusing GVFS.Common.Tracing;\r\nusing System.Collections"
},
{
"path": "GVFS/GVFS.Common/Prefetch/Pipeline/PrefetchPipelineStage.cs",
"chars": 1498,
"preview": "using System;\r\nusing System.Threading;\r\n\r\nnamespace GVFS.Common.Prefetch.Pipeline\r\n{\r\n public abstract class Prefetc"
},
{
"path": "GVFS/GVFS.Common/ProcessHelper.cs",
"chars": 5307,
"preview": "using System;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Reflection;\r\n\r\nnamespace GV"
},
{
"path": "GVFS/GVFS.Common/ProcessResult.cs",
"chars": 399,
"preview": "namespace GVFS.Common\r\n{\r\n public class ProcessResult\r\n {\r\n public ProcessResult(string output, string err"
},
{
"path": "GVFS/GVFS.Common/ProcessRunnerImpl.cs",
"chars": 565,
"preview": "namespace GVFS.Common\r\n{\r\n /// <summary>\r\n /// Default product implementation of IProcessRunner\r\n /// interface"
},
{
"path": "GVFS/GVFS.Common/RepoMetadata.cs",
"chars": 10532,
"preview": "using GVFS.Common.FileSystem;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing Syste"
},
{
"path": "GVFS/GVFS.Common/RetryBackoff.cs",
"chars": 2076,
"preview": "using System;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public static class RetryBackoff\r\n {\r\n public const double Def"
},
{
"path": "GVFS/GVFS.Common/RetryCircuitBreaker.cs",
"chars": 2626,
"preview": "using System;\r\nusing System.Threading;\r\n\r\nnamespace GVFS.Common\r\n{\r\n /// <summary>\r\n /// Global circuit breaker f"
},
{
"path": "GVFS/GVFS.Common/RetryConfig.cs",
"chars": 4591,
"preview": "using GVFS.Common.Git;\r\nusing GVFS.Common.Tracing;\r\nusing System;\r\nusing System.Linq;\r\n\r\nnamespace GVFS.Common\r\n{\r\n "
},
{
"path": "GVFS/GVFS.Common/RetryWrapper.cs",
"chars": 9361,
"preview": "using GVFS.Common.Tracing;\r\nusing System;\r\nusing System.IO;\r\nusing System.Net.Http;\r\nusing System.Threading;\r\nusing Sys"
},
{
"path": "GVFS/GVFS.Common/RetryableException.cs",
"chars": 314,
"preview": "using System;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public class RetryableException : Exception\r\n {\r\n public Retry"
},
{
"path": "GVFS/GVFS.Common/ReturnCode.cs",
"chars": 348,
"preview": "namespace GVFS.Common\r\n{\r\n public enum ReturnCode\r\n {\r\n Success = 0,\r\n ParsingError = 1,\r\n R"
},
{
"path": "GVFS/GVFS.Common/SHA1Util.cs",
"chars": 2561,
"preview": "using System;\r\nusing System.Linq;\r\nusing System.Security.Cryptography;\r\nusing System.Text;\r\n\r\nnamespace GVFS.Common\r\n{\r"
},
{
"path": "GVFS/GVFS.Common/ServerGVFSConfig.cs",
"chars": 520,
"preview": "using GVFS.Common.Http;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace GVFS.Common\r"
},
{
"path": "GVFS/GVFS.Common/StreamUtil.cs",
"chars": 3440,
"preview": "using System;\r\nusing System.IO;\r\n\r\nnamespace GVFS.Common\r\n{\r\n public class StreamUtil\r\n {\r\n /// <summary>\r"
},
{
"path": "GVFS/GVFS.Common/Tracing/DiagnosticConsoleEventListener.cs",
"chars": 798,
"preview": "using System;\r\n\r\nnamespace GVFS.Common.Tracing\r\n{\r\n /// <summary>\r\n /// An event listener that will print all t"
}
]
// ... and 465 more files (download for full content)
About this extraction
This page contains the full source code of the Microsoft/VFSForGit GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 665 files (4.2 MB), approximately 1.1M tokens, and a symbol index with 5785 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.