microsoft / microsoft/VFSForGit
Windows: HooksInstaller.InstallHooks sometimes fails during mount verb
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 474
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
We've had a three reports of this issue since the release of version 1.0.18297.1:
Two reports of "Failed to flush buffers":
Error installing hooks: Failed to copy C:\Program Files\GVFS\GVFS.ReadObjectHook.exe
System.ComponentModel.Win32Exception (0x80004005): Failed to flush buffers for 'F:\<repo name>\src\.git\hooks\read-object.exe.temp'
at GVFS.Common.NativeMethods.ThrowLastWin32Exception(String message)
at GVFS.Common.NativeMethods.FlushFileBuffers(String path)
at GVFS.Common.FileSystem.PhysicalFileSystem.TryCopyToTempFileAndRename(String sourcePath, String destinationPath, Exception& handledException)
One report of "Failed to move":
e:\git\os\src>gvfs mount
Error installing hooks: Failed to copy GitHooksLoader.exe to E:\git\<repo name>\src\.git\hooks\pre-command.exe
System.ComponentModel.Win32Exception (0x80004005): Failed to move 'E:\git\os\src\.git\hooks\pre-command.exe.temp' to 'E:\git\os\src\.git\hooks\pre-command.exe'
at GVFS.Common.NativeMethods.ThrowLastWin32Exception(String message)
at GVFS.Common.NativeMethods.MoveFile(String existingFileName, String newFileName, MoveFileFlags flags)
at GVFS.Common.FileSystem.PhysicalFileSystem.TryCopyToTempFileAndRename(String sourcePath, String destinationPath, Exception& handledException)
Ideally we can root cause and fix this, but at a minimum, we should update VFS4G to provide the user with a more actionable message.
Related issue: #168
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at HooksInstaller.InstallHooks and the PhysicalFileSystem.TryCopyToTempFileAndRename stack traces, then inspect the Windows mount verb path that installs Git hooks. Reproduce the flush or move failure if possible; done means identifying and fixing the failure or, at minimum, presenting a more actionable VFS4G error message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100