Permalink
Browse files

Automount and other updates:

- Added a Windows service that performs automount after a reboot
- No more 'git.exe cat-file' background processes
- Downloaded Git objects are now written to a cache in the .gvfs folder
- Bug fixes and perf improvements
  • Loading branch information...
sanoursa committed Jun 28, 2017
1 parent e351386 commit 522d018a2e34a13e56a94b158b7bc58ba3009a1d
Showing with 5,601 additions and 2,157 deletions.
  1. +20 −0 GVFS.sln
  2. +2 −4 GVFS/FastFetch/FastFetch.csproj
  3. +4 −4 GVFS/FastFetch/FetchHelper.cs
  4. +3 −3 GVFS/FastFetch/Git/DiffHelper.cs
  5. +3 −3 GVFS/FastFetch/Git/GitIndexGenerator.cs
  6. +8 −1 GVFS/FastFetch/GitEnlistment.cs
  7. +4 −18 GVFS/FastFetch/Jobs/BatchObjectDownloadJob.cs
  8. +1 −1 GVFS/FastFetch/Jobs/CheckoutJob.cs
  9. +4 −11 GVFS/FastFetch/Jobs/FindMissingBlobsJob.cs
  10. +1 −1 GVFS/FastFetch/Properties/AssemblyInfo.cs
  11. +26 −34 GVFS/GVFS.Common/Enlistment.cs
  12. +1 −6 GVFS/GVFS.Common/EnlistmentUtils.cs
  13. +9 −9 GVFS/GVFS.Common/GVFS.Common.csproj
  14. +48 −46 GVFS/GVFS.Common/GVFSConstants.cs
  15. +48 −36 GVFS/GVFS.Common/GVFSEnlistment.cs
  16. +3 −1 GVFS/GVFS.Common/GVFSLock.cs
  17. +0 −8 GVFS/GVFS.Common/Git/CatFileTimeoutException.cs
  18. +8 −7 GVFS/GVFS.Common/Git/DiffTreeResult.cs
  19. +73 −37 GVFS/GVFS.Common/Git/GitAuthentication.cs
  20. +0 −50 GVFS/GVFS.Common/Git/GitCatFileBatchCheckProcess.cs
  21. +0 −163 GVFS/GVFS.Common/Git/GitCatFileBatchProcess.cs
  22. +0 −88 GVFS/GVFS.Common/Git/GitCatFileProcess.cs
  23. +22 −34 GVFS/GVFS.Common/Git/GitObjects.cs
  24. +17 −0 GVFS/GVFS.Common/Git/GitOid.cs
  25. +19 −30 GVFS/GVFS.Common/Git/GitProcess.cs
  26. +44 −10 GVFS/{FastFetch → GVFS.Common}/Git/LibGit2Helpers.cs
  27. +115 −13 GVFS/{FastFetch → GVFS.Common}/Git/LibGit2Repo.cs
  28. +41 −0 GVFS/GVFS.Common/Git/RefLogEntry.cs
  29. +18 −7 GVFS/GVFS.Common/HeartbeatThread.cs
  30. +7 −5 GVFS/GVFS.Common/Http/ConfigHttpRequestor.cs
  31. +55 −22 GVFS/GVFS.Common/Http/GitObjectsHttpRequestor.cs
  32. +45 −14 GVFS/GVFS.Common/Http/HttpRequestor.cs
  33. +102 −0 GVFS/GVFS.Common/LibGit2RepoPool.cs
  34. +16 −4 GVFS/GVFS.Common/NamedPipes/AllowAllLocksNamedPipeServer.cs
  35. +25 −2 GVFS/GVFS.Common/NamedPipes/NamedPipeClient.cs
  36. +112 −3 GVFS/GVFS.Common/NamedPipes/NamedPipeMessages.cs
  37. +111 −47 GVFS/GVFS.Common/NamedPipes/NamedPipeServer.cs
  38. 0 GVFS/GVFS.Common/NamedPipes/{PipeNameLengthException .cs → PipeNameLengthException.cs}
  39. +5 −0 GVFS/GVFS.Common/Physical/FileSystem/PhysicalFileSystem.cs
  40. +4 −9 GVFS/GVFS.Common/Physical/FileSystem/StreamReaderExtensions.cs
  41. +0 −8 GVFS/GVFS.Common/Physical/Git/CopyBlobContentTimeoutException.cs
  42. +6 −11 GVFS/GVFS.Common/Physical/Git/GVFSGitObjects.cs
  43. +103 −32 GVFS/GVFS.Common/Physical/Git/GitRepo.cs
  44. +25 −9 GVFS/GVFS.Common/Physical/RepoMetadata.cs
  45. +2 −3 GVFS/GVFS.Common/ProcessHelper.cs
  46. +0 −158 GVFS/GVFS.Common/ProcessPool.cs
  47. +1 −1 GVFS/GVFS.Common/Properties/AssemblyInfo.cs
  48. +5 −78 GVFS/GVFS.Common/ReliableBackgroundOperations.cs
  49. +41 −0 GVFS/GVFS.Common/RepoRegistration.cs
  50. +2 −1 GVFS/GVFS.Common/RetryWrapper.cs
  51. +0 −52 GVFS/GVFS.Common/TaskExtensions.cs
  52. +2 −0 GVFS/GVFS.Common/Tracing/ITracer.cs
  53. +7 −0 GVFS/GVFS.Common/Tracing/JsonEtwTracer.cs
  54. +9 −2 GVFS/GVFS.Common/Tracing/LogFileEventListener.cs
  55. +1 −0 GVFS/GVFS.Common/packages.config
  56. 0 GVFS/GVFS.FunctionalTests/{ → FileSystemRunners}/Category/CategoryConstants.cs
  57. +8 −2 GVFS/GVFS.FunctionalTests/GVFS.FunctionalTests.csproj
  58. +33 −1 GVFS/GVFS.FunctionalTests/Program.cs
  59. +13 −1 GVFS/GVFS.FunctionalTests/Properties/Settings.Designer.cs
  60. +4 −1 GVFS/GVFS.FunctionalTests/Properties/Settings.settings
  61. +4 −4 GVFS/GVFS.FunctionalTests/Should/FileSystemShouldExtensions.cs
  62. +2 −2 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DehydrateTests.cs
  63. +2 −1 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs
  64. +49 −0 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs
  65. +0 −17 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/TestsWithEnlistmentPerFixture.cs
  66. +0 −4 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/UpdatePlaceholderTests.cs
  67. +0 −112 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/PrefetchVerbTests.cs
  68. +56 −0 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/RepairTests.cs
  69. +0 −7 GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/TestsWithEnlistmentPerTestCase.cs
  70. +47 −0 GVFS/GVFS.FunctionalTests/Tests/GitCommands/CheckoutTests.cs
  71. +33 −0 GVFS/GVFS.FunctionalTests/Tests/GitCommands/EnumerationMergeTest.cs
  72. +66 −0 GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs
  73. +34 −17 GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitRepoTests.cs
  74. +0 −11 GVFS/GVFS.FunctionalTests/Tests/LongRunningEnlistment/LongRunningSetup.cs
  75. +0 −10 GVFS/GVFS.FunctionalTests/Tests/LongRunningEnlistment/TestsWithLongRunningEnlistment.cs
  76. +17 −5 GVFS/GVFS.FunctionalTests/Tests/TestResultsHelper.cs
  77. +2 −2 GVFS/GVFS.FunctionalTests/Tools/ControlGitRepo.cs
  78. +34 −20 GVFS/GVFS.FunctionalTests/Tools/GVFSFunctionalTestEnlistment.cs
  79. +27 −6 GVFS/GVFS.FunctionalTests/Tools/GVFSProcess.cs
  80. +92 −0 GVFS/GVFS.FunctionalTests/Tools/GVFSServiceProcess.cs
  81. +8 −2 GVFS/GVFS.FunctionalTests/app.config
  82. +65 −56 GVFS/GVFS.GVFlt/DotGit/GitIndexProjection.cs
  83. +2 −0 GVFS/GVFS.GVFlt/GVFS.GVFlt.csproj
  84. +134 −224 GVFS/GVFS.GVFlt/GVFltCallbacks.cs
  85. +1 −1 GVFS/GVFS.GVFlt/Properties/AssemblyInfo.cs
  86. +1 −1 GVFS/GVFS.GvFltWrapper/AssemblyInfo.cpp
  87. +8 −4 GVFS/GVFS.GvFltWrapper/GVFS.GvFltWrapper.vcxproj
  88. +1 −0 GVFS/GVFS.GvFltWrapper/GVFS.GvFltWrapper.vcxproj.filters
  89. +14 −0 GVFS/GVFS.GvFltWrapper/GvFlt.props
  90. +2 −1 GVFS/GVFS.GvFltWrapper/GvUpdateType.h
  91. BIN GVFS/GVFS.GvFltWrapper/Version.rc
  92. +1 −1 GVFS/GVFS.GvFltWrapper/packages.config
  93. +38 −23 GVFS/GVFS.Hooks/Program.cs
  94. +1 −1 GVFS/GVFS.Hooks/Properties/AssemblyInfo.cs
  95. +1 −0 GVFS/GVFS.Mount/GVFS.Mount.csproj
  96. +38 −16 GVFS/GVFS.Mount/InProcessMount.cs
  97. +13 −8 GVFS/GVFS.Mount/InProcessMountVerb.cs
  98. +1 −0 GVFS/{GVFS.Common → GVFS.Mount}/MountParameters.cs
  99. +1 −1 GVFS/GVFS.Mount/Properties/AssemblyInfo.cs
  100. +9 −6 GVFS/GVFS.NativeTests/GVFS.NativeTests.vcxproj
  101. BIN GVFS/GVFS.ReadObjectHook/Version.rc
  102. +13 −0 GVFS/GVFS.Service.UI/Data/ActionItem.cs
  103. +10 −0 GVFS/GVFS.Service.UI/Data/ActionsData.cs
  104. +13 −0 GVFS/GVFS.Service.UI/Data/BindingData.cs
  105. +37 −0 GVFS/GVFS.Service.UI/Data/BindingItem.cs
  106. +20 −0 GVFS/GVFS.Service.UI/Data/ToastData.cs
  107. +10 −0 GVFS/GVFS.Service.UI/Data/VisualData.cs
  108. +98 −0 GVFS/GVFS.Service.UI/GVFS.Service.UI.csproj
  109. +80 −0 GVFS/GVFS.Service.UI/Program.cs
  110. +51 −0 GVFS/GVFS.Service.UI/ToastHelper.cs
  111. +32 −0 GVFS/GVFS.Service.UI/XmlList.cs
  112. +8 −0 GVFS/GVFS.Service.UI/packages.config
  113. +42 −0 GVFS/GVFS.Service/Configuration.cs
  114. +131 −0 GVFS/GVFS.Service/GVFS.Service.csproj
  115. +186 −0 GVFS/GVFS.Service/GVFSMountProcess.cs
  116. +29 −0 GVFS/GVFS.Service/GVFSServiceInstaller.cs
  117. +278 −0 GVFS/GVFS.Service/GvfsService.cs
  118. +58 −0 GVFS/GVFS.Service/Handlers/MountHandler.cs
  119. +91 −0 GVFS/GVFS.Service/Handlers/NotificationHandler.cs
  120. +143 −0 GVFS/GVFS.Service/Handlers/UnmountHandler.cs
  121. +373 −0 GVFS/GVFS.Service/ProcessAsCurrentUser.cs
  122. +37 −0 GVFS/GVFS.Service/Program.cs
  123. +22 −0 GVFS/GVFS.Service/Properties/AssemblyInfo.cs
  124. +263 −0 GVFS/GVFS.Service/RepoRegistry.cs
  125. +12 −0 GVFS/GVFS.Service/packages.config
  126. +0 −6 GVFS/GVFS.Tests/NUnitRunner.cs
  127. +52 −0 GVFS/GVFS.UnitTests/Common/RefLogEntryTests.cs
  128. +2 −1 GVFS/GVFS.UnitTests/GVFS.UnitTests.csproj
  129. +1 −1 GVFS/GVFS.UnitTests/Mock/Common/MockEnlistment.cs
  130. +1 −2 GVFS/GVFS.UnitTests/Mock/Common/MockPhysicalGitObjects.cs
  131. +4 −0 GVFS/GVFS.UnitTests/Mock/Common/MockTracer.cs
  132. +2 −3 GVFS/GVFS.UnitTests/Mock/Physical/Git/MockBatchHttpGitObjects.cs
  133. +3 −20 GVFS/GVFS.UnitTests/Mock/Physical/Git/MockGitRepo.cs
  134. +3 −4 GVFS/GVFS.UnitTests/Mock/Physical/Git/MockHttpGitObjects.cs
  135. +223 −0 GVFS/GVFS.UnitTests/Physical/Git/GitAuthenticationTests.cs
  136. +0 −99 GVFS/GVFS.UnitTests/Physical/Git/GitCatFileBatchProcessTests.cs
  137. +5 −9 GVFS/GVFS.UnitTests/Physical/Git/PhysicalGitObjectsTests.cs
  138. +1 −1 GVFS/GVFS.UnitTests/Virtual/CommonRepoSetup.cs
  139. +36 −25 GVFS/GVFS/CommandLine/CloneHelper.cs
  140. +8 −15 GVFS/GVFS/CommandLine/CloneVerb.cs
  141. +11 −4 GVFS/GVFS/CommandLine/DehydrateVerb.cs
  142. +25 −9 GVFS/GVFS/CommandLine/DiagnoseVerb.cs
  143. +32 −56 GVFS/GVFS/CommandLine/GVFSVerb.cs
  144. +102 −50 GVFS/GVFS/CommandLine/HooksInstallHelper.cs
  145. +42 −7 GVFS/GVFS/CommandLine/LogVerb.cs
  146. +46 −57 GVFS/GVFS/CommandLine/MountVerb.cs
  147. +2 −2 GVFS/GVFS/CommandLine/PrefetchHelper.cs
  148. +2 −3 GVFS/GVFS/CommandLine/PrefetchVerb.cs
  149. +47 −0 GVFS/GVFS/CommandLine/RepairJobs/BackgroundOperationDatabaseRepairJob.cs
  150. +59 −0 GVFS/GVFS/CommandLine/RepairJobs/BlobSizeDatabaseRepairJob.cs
  151. +192 −0 GVFS/GVFS/CommandLine/RepairJobs/GitHeadRepairJob.cs
  152. +47 −0 GVFS/GVFS/CommandLine/RepairJobs/PlaceholderDatabaseRepairJob.cs
  153. +33 −0 GVFS/GVFS/CommandLine/RepairJobs/RepairJob.cs
  154. +47 −0 GVFS/GVFS/CommandLine/RepairJobs/RepoMetadataDatabaseRepairJob.cs
  155. +201 −0 GVFS/GVFS/CommandLine/RepairVerb.cs
  156. +18 −1 GVFS/GVFS/CommandLine/StatusVerb.cs
  157. +32 −63 GVFS/GVFS/CommandLine/UnmountVerb.cs
  158. +13 −1 GVFS/GVFS/GVFS.csproj
  159. +1 −0 GVFS/GVFS/Program.cs
  160. +116 −3 GVFS/GVFS/Setup.iss
  161. +12 −0 GVFS/GvLib.NativeBinaries.props
  162. 0 GVFS/{FastFetch → }/LibGit2Sharp.NativeBinaries.props
  163. +51 −51 GvFlt_EULA.md
  164. +2 −2 Readme.md
  165. +0 −4 Scripts/RunFunctionalTests.bat
  166. +0 −4 Scripts/RunUnitTests.bat
View
@@ -15,6 +15,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GVFS", "GVFS", "{2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}"
ProjectSection(SolutionItems) = preProject
GVFS\GvLib.NativeBinaries.props = GVFS\GvLib.NativeBinaries.props
GVFS\LibGit2Sharp.NativeBinaries.props = GVFS\LibGit2Sharp.NativeBinaries.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.GVFlt", "GVFS\GVFS.GVFlt\GVFS.GVFlt.csproj", "{1118B427-7063-422F-83B9-5023C8EC5A7A}"
EndProject
@@ -30,6 +34,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS", "GVFS\GVFS\GVFS.cspr
ProjectSection(ProjectDependencies) = postProject
{17498502-AEFF-4E70-90CC-1D0B56A8ADF5} = {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}
{798DE293-6EDA-4DC4-9395-BE7A71C563E3} = {798DE293-6EDA-4DC4-9395-BE7A71C563E3}
{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B} = {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}
{5A6656D5-81C7-472C-9DC8-32D071CB2258} = {5A6656D5-81C7-472C-9DC8-32D071CB2258}
{BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
EndProjectSection
@@ -47,13 +52,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.FunctionalTests", "GVF
{07F2A520-2AB7-46DD-97C0-75D8E988D55B} = {07F2A520-2AB7-46DD-97C0-75D8E988D55B}
{3771C555-B5C1-45E2-B8B7-2CEF1619CDC5} = {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}
{32220664-594C-4425-B9A0-88E0BE2F3D2A} = {32220664-594C-4425-B9A0-88E0BE2F3D2A}
{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B} = {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}
{BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GVFS.NativeTests", "GVFS\GVFS.NativeTests\GVFS.NativeTests.vcxproj", "{3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Hooks", "GVFS\GVFS.Hooks\GVFS.Hooks.csproj", "{BDA91EE5-C684-4FC5-A90A-B7D677421917}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Service", "GVFS\GVFS.Service\GVFS.Service.csproj", "{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Mount", "GVFS\GVFS.Mount\GVFS.Mount.csproj", "{17498502-AEFF-4E70-90CC-1D0B56A8ADF5}"
ProjectSection(ProjectDependencies) = postProject
{5A6656D5-81C7-472C-9DC8-32D071CB2258} = {5A6656D5-81C7-472C-9DC8-32D071CB2258}
@@ -70,6 +78,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{2867
Scripts\RunUnitTests.bat = Scripts\RunUnitTests.bat
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Service.UI", "GVFS\GVFS.Service.UI\GVFS.Service.UI.csproj", "{93B403FD-DAFB-46C5-9636-B122792A548A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GitHooksLoader", "GitHooksLoader\GitHooksLoader.vcxproj", "{798DE293-6EDA-4DC4-9395-BE7A71C563E3}"
EndProject
Global
@@ -118,6 +128,10 @@ Global
{BDA91EE5-C684-4FC5-A90A-B7D677421917}.Debug|x64.Build.0 = Debug|x64
{BDA91EE5-C684-4FC5-A90A-B7D677421917}.Release|x64.ActiveCfg = Release|x64
{BDA91EE5-C684-4FC5-A90A-B7D677421917}.Release|x64.Build.0 = Release|x64
{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}.Debug|x64.ActiveCfg = Debug|x64
{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}.Debug|x64.Build.0 = Debug|x64
{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}.Release|x64.ActiveCfg = Release|x64
{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}.Release|x64.Build.0 = Release|x64
{17498502-AEFF-4E70-90CC-1D0B56A8ADF5}.Debug|x64.ActiveCfg = Debug|x64
{17498502-AEFF-4E70-90CC-1D0B56A8ADF5}.Debug|x64.Build.0 = Debug|x64
{17498502-AEFF-4E70-90CC-1D0B56A8ADF5}.Release|x64.ActiveCfg = Release|x64
@@ -126,6 +140,10 @@ Global
{5A6656D5-81C7-472C-9DC8-32D071CB2258}.Debug|x64.Build.0 = Debug|x64
{5A6656D5-81C7-472C-9DC8-32D071CB2258}.Release|x64.ActiveCfg = Release|x64
{5A6656D5-81C7-472C-9DC8-32D071CB2258}.Release|x64.Build.0 = Release|x64
{93B403FD-DAFB-46C5-9636-B122792A548A}.Debug|x64.ActiveCfg = Debug|x64
{93B403FD-DAFB-46C5-9636-B122792A548A}.Debug|x64.Build.0 = Debug|x64
{93B403FD-DAFB-46C5-9636-B122792A548A}.Release|x64.ActiveCfg = Release|x64
{93B403FD-DAFB-46C5-9636-B122792A548A}.Release|x64.Build.0 = Release|x64
{798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Debug|x64.ActiveCfg = Debug|x64
{798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Debug|x64.Build.0 = Debug|x64
{798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Release|x64.ActiveCfg = Release|x64
@@ -145,8 +163,10 @@ Global
{0F0A008E-AB12-40EC-A671-37A541B08C7F} = {C41F10F9-1163-4CFA-A465-EA728F75E9FA}
{3771C555-B5C1-45E2-B8B7-2CEF1619CDC5} = {C41F10F9-1163-4CFA-A465-EA728F75E9FA}
{BDA91EE5-C684-4FC5-A90A-B7D677421917} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
{17498502-AEFF-4E70-90CC-1D0B56A8ADF5} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
{5A6656D5-81C7-472C-9DC8-32D071CB2258} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
{28674A4B-1223-4633-A460-C8CC39B09318} = {DCE11095-DA5F-4878-B58D-2702765560F5}
{93B403FD-DAFB-46C5-9636-B122792A548A} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
EndGlobalSection
EndGlobal
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="LibGit2Sharp.NativeBinaries.props" Condition="Exists('LibGit2Sharp.NativeBinaries.props')" />
<Import Project="..\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\LibGit2Sharp.NativeBinaries.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -73,8 +73,6 @@
<Compile Include="GitEnlistment.cs" />
<Compile Include="Git\DiffHelper.cs" />
<Compile Include="Git\GitPackIndex.cs" />
<Compile Include="Git\LibGit2Helpers.cs" />
<Compile Include="Git\LibGit2Repo.cs" />
<Compile Include="Git\RefSpecHelpers.cs" />
<Compile Include="Index.cs" />
<Compile Include="Jobs\BatchObjectDownloadJob.cs" />
@@ -108,7 +106,7 @@
<Error Condition="!Exists('..\..\..\packages\StyleCop.Error.MSBuild.1.0.0\build\StyleCop.Error.MSBuild.Targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\StyleCop.Error.MSBuild.1.0.0\build\StyleCop.Error.MSBuild.Targets'))" />
<Error Condition="!Exists('..\..\..\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.1.28\build\Microsoft.Diagnostics.Tracing.EventRegister.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.1.28\build\Microsoft.Diagnostics.Tracing.EventRegister.targets'))" />
<Error Condition="!Exists('..\..\..\packages\StyleCop.MSBuild.4.7.54.0\build\StyleCop.MSBuild.Targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\StyleCop.MSBuild.4.7.54.0\build\StyleCop.MSBuild.Targets'))" />
<Error Condition="!Exists('LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', 'LibGit2Sharp.NativeBinaries.props'))" />
<Error Condition="!Exists('..\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\LibGit2Sharp.NativeBinaries.props'))" />
</Target>
<Import Project="..\..\..\packages\StyleCop.Error.MSBuild.1.0.0\build\StyleCop.Error.MSBuild.Targets" Condition="Exists('..\..\..\packages\StyleCop.Error.MSBuild.1.0.0\build\StyleCop.Error.MSBuild.Targets')" />
<Import Project="..\..\..\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.1.28\build\Microsoft.Diagnostics.Tracing.EventRegister.targets" Condition="Exists('..\..\..\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.1.28\build\Microsoft.Diagnostics.Tracing.EventRegister.targets')" />
@@ -46,7 +46,7 @@ public class FetchHelper
this.ChunkSize = chunkSize;
this.Tracer = tracer;
this.Enlistment = enlistment;
this.ObjectRequestor = new GitObjectsHttpRequestor(tracer, enlistment, downloadThreadCount);
this.ObjectRequestor = new GitObjectsHttpRequestor(tracer, enlistment);
this.GitObjects = new GitObjects(tracer, enlistment, this.ObjectRequestor);
this.PathWhitelist = new List<string>();
@@ -77,7 +77,7 @@ public static bool TryLoadPathWhitelist(ITracer tracer, string pathWhitelistInpu
IEnumerable<string> allLines = File.ReadAllLines(pathWhitelistFile)
.Select(line => line.Trim())
.Where(line => !string.IsNullOrEmpty(line))
.Where(line => !line.StartsWith(GVFSConstants.GitCommentSignString))
.Where(line => !line.StartsWith(GVFSConstants.GitCommentSign.ToString()))
.Select(makePathAbsolute);
pathWhitelistOutput.AddRange(allLines);
@@ -214,9 +214,9 @@ protected void DownloadMissingCommit(string commitSha, GitObjects gitObjects)
using (ITracer activity = this.Tracer.StartActivity("DownloadTrees", EventLevel.Informational, Keywords.Telemetry, startMetadata))
{
using (GitCatFileBatchCheckProcess catFileProcess = new GitCatFileBatchCheckProcess(this.Tracer, this.Enlistment))
using (LibGit2Repo repo = new LibGit2Repo(this.Tracer, this.Enlistment.WorkingDirectoryRoot))
{
if (!catFileProcess.ObjectExists_CanTimeout(commitSha))
if (!repo.ObjectExists(commitSha))
{
if (!gitObjects.TryDownloadAndSaveCommits(new[] { commitSha }, commitDepth: CommitDepth))
{
@@ -68,10 +68,10 @@ public void PerformDiff(string targetCommitSha)
{
string targetTreeSha;
string headTreeSha;
using (GitCatFileBatchProcess catFile = new GitCatFileBatchProcess(this.tracer, this.enlistment))
using (LibGit2Repo repo = new LibGit2Repo(this.tracer, this.enlistment.WorkingDirectoryRoot))
{
targetTreeSha = catFile.GetTreeSha_CanTimeout(targetCommitSha);
headTreeSha = catFile.GetTreeSha_CanTimeout("HEAD");
targetTreeSha = repo.GetTreeSha(targetCommitSha);
headTreeSha = repo.GetTreeSha("HEAD");
}
this.PerformDiff(headTreeSha, targetTreeSha);
@@ -69,7 +69,7 @@ public void CreateFromHeadTree()
GitProcess git = new GitProcess(this.enlistment);
GitProcess.Result result = git.LsTree(
GVFSConstants.HeadCommitName,
GVFSConstants.DotGit.HeadName,
this.EnqueueEntriesFromLsTree,
recursive: true,
showAllTrees: false);
@@ -191,11 +191,11 @@ private class LsTreeEntry
public static LsTreeEntry ParseFromLsTreeLine(string line)
{
int blobIndex = line.IndexOf(GitCatFileProcess.BlobMarker);
int blobIndex = line.IndexOf(DiffTreeResult.BlobMarker);
if (blobIndex >= 0)
{
LsTreeEntry blobEntry = new LsTreeEntry();
blobEntry.Sha = line.Substring(blobIndex + GitCatFileProcess.BlobMarker.Length, GVFSConstants.ShaStringLength);
blobEntry.Sha = line.Substring(blobIndex + DiffTreeResult.BlobMarker.Length, GVFSConstants.ShaStringLength);
blobEntry.Filename = GitPathConverter.ConvertPathOctetsToUtf8(line.Substring(line.LastIndexOf("\t") + 1).Trim('"'));
return blobEntry;
@@ -8,7 +8,14 @@ namespace FastFetch
public class GitEnlistment : Enlistment
{
private GitEnlistment(string repoRoot, string cacheBaseUrl, string gitBinPath)
: base(repoRoot, repoRoot, cacheBaseUrl, gitBinPath, gvfsHooksRoot: null)
: base(
repoRoot,
repoRoot,
Path.Combine(repoRoot, GVFSConstants.DotGit.Objects.Root),
null,
cacheBaseUrl,
gitBinPath,
gvfsHooksRoot: null)
{
}
@@ -80,30 +80,18 @@ protected override void DoWork()
metadata.Add("PackId", request.PackId);
metadata.Add("ActiveDownloads", this.activeDownloadCount);
metadata.Add("NumberOfObjects", request.ObjectIds.Count);
using (ITracer activity = this.tracer.StartActivity(DownloadAreaPath, EventLevel.Informational, Keywords.Telemetry, metadata))
{
try
{
RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.InvocationResult result;
if (request.ObjectIds.Count == 1)
{
result = this.objectRequestor.TryDownloadLooseObject(
request.ObjectIds[0],
onSuccess: (tryCount, response) => this.WriteObjectOrPack(request, tryCount, response),
onFailure: RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.StandardErrorHandler(activity, DownloadAreaPath));
}
else
{
HashSet<string> successfulDownloads = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
result = this.objectRequestor.TryDownloadObjects(
HashSet<string> successfulDownloads = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.InvocationResult result = this.objectRequestor.TryDownloadObjects(
() => request.ObjectIds.Except(successfulDownloads),
commitDepth: 1,
onSuccess: (tryCount, response) => this.WriteObjectOrPack(request, tryCount, response, successfulDownloads),
onFailure: RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.StandardErrorHandler(activity, DownloadAreaPath),
onFailure: RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.StandardErrorHandler(activity, request.PackId, DownloadAreaPath),
preferBatchedLooseObjects: true);
}
if (!result.Succeeded)
{
@@ -150,7 +138,6 @@ protected override void DoAfterWork()
case GitObjectContentType.LooseObject:
string sha = request.ObjectIds.First();
fileName = this.gitObjects.WriteLooseObject(
this.enlistment.WorkingDirectoryRoot,
response.Stream,
sha,
bufToCopyWith);
@@ -164,7 +151,6 @@ protected override void DoAfterWork()
OnLooseObject onLooseObject = (objectStream, sha1) =>
{
this.gitObjects.WriteLooseObject(
this.enlistment.WorkingDirectoryRoot,
objectStream,
sha1,
bufToCopyWith);
@@ -274,7 +274,7 @@ private void HandleAllFileDeleteOperations()
private void HandleAllFileAddOperations()
{
using (LibGit2Repo repo = new LibGit2Repo(this.tracer, this.enlistment.EnlistmentRoot))
using (LibGit2Repo repo = new LibGit2Repo(this.tracer, this.enlistment.WorkingDirectoryRoot))
{
string availableBlob;
while (this.AvailableBlobShas.TryTake(out availableBlob, millisecondsTimeout: -1))
@@ -27,7 +27,6 @@ public class FindMissingBlobsJob : Job
private BlockingCollection<string> inputQueue;
private ConcurrentHashSet<string> alreadyFoundBlobIds;
private ProcessPool<GitCatFileBatchCheckProcess> catFilePool;
public FindMissingBlobsJob(
int maxParallel,
@@ -44,11 +43,6 @@ public class FindMissingBlobsJob : Job
this.DownloadQueue = new BlockingCollection<string>();
this.AvailableBlobs = availableBlobs;
this.catFilePool = new ProcessPool<GitCatFileBatchCheckProcess>(
tracer,
() => new GitCatFileBatchCheckProcess(this.tracer, this.enlistment),
maxParallel);
}
public BlockingCollection<string> DownloadQueue { get; }
@@ -57,11 +51,11 @@ public class FindMissingBlobsJob : Job
protected override void DoWork()
{
string blobId;
while (this.inputQueue.TryTake(out blobId, Timeout.Infinite))
using (LibGit2Repo repo = new LibGit2Repo(this.tracer, this.enlistment.WorkingDirectoryRoot))
{
this.catFilePool.Invoke(catFileProcess =>
while (this.inputQueue.TryTake(out blobId, Timeout.Infinite))
{
if (!catFileProcess.ObjectExists_CanTimeout(blobId))
if (!repo.ObjectExists(blobId))
{
Interlocked.Increment(ref this.missingBlobCount);
this.DownloadQueue.Add(blobId);
@@ -71,14 +65,13 @@ protected override void DoWork()
Interlocked.Increment(ref this.availableBlobCount);
this.AvailableBlobs.Add(blobId);
}
});
}
}
}
protected override void DoAfterWork()
{
this.DownloadQueue.CompleteAdding();
this.catFilePool.Dispose();
EventMetadata metadata = new EventMetadata();
metadata.Add("TotalMissingObjects", this.missingBlobCount);
@@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FastFetch")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
Oops, something went wrong.

0 comments on commit 522d018

Please sign in to comment.