You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error occurs when attempting to add a local repo from a mapped network drive on Windows.
The error message is misleading, because there is an actual error in the logs, but the error displayed to the user is "Must be a Git repository" (which the directory actually is)
How to reproduce
clone a repository in a directory accessible over the network; in my case, this is a directory in my local Linux VM hosted on WSL2
map a Windows drive to the network directory (e.g. U:)
attempt to add the repo to GitButler by browsing to the mapped drive and the respective directory
Expected behavior
Repo is added successfully
Relevant log output
2024-09-22T16:57:57.029516Z INFO add_project: crates\gitbutler-tauri\src\projects.rs:23: new path="U:\\home\\prj\\butler-repo"
2024-09-22T16:57:57.050538Z ERROR add_project: crates\gitbutler-tauri\src\projects.rs:23: error=Error(must be a Git repository
Caused by:
Couldn't get security information for path 'U:\home\prj\butler-repo\.git' with err Incorrect function. (os error 1)) path="U:\\home\\prj\\butler-repo"2024-09-22T16:57:57.050642Z INFO add_project: crates\gitbutler-tauri\src\projects.rs:23: close time.busy=21.1ms time.idle=32.8µs path="U:\\home\\prj\\butler-repo"
The text was updated successfully, but these errors were encountered:
It appears that gitoxide was unable to obtain ownership information from a mapped network drive. Maybe git2 would succeed here, but gix seems to be first in line. It seemingly does things similarly. Git itself also seems to do the same, so I wonder if git works in the mapped location?
Maybe this is at least tangentially related to GitoxideLabs/gitoxide#1429, and I'd hope that @EliahKagan could also take a look. Seeing how similar the implementations are I wonder if Git for Windows patches in something special there.
Yes, git appears to work on the mapped drive from Windows.
PS U:\home\prj\butler-repo> git version
git version 2.45.2.windows.1
PS U:\home\prj\butler-repo> git status
Refresh index: 100% (10273/10273), done.
On branch main
Your branch is up to date with 'origin/main'.
...
Version
0.12.25
Operating System
Windows
Distribution Method
msi (Windows)
Describe the issue
An error occurs when attempting to add a local repo from a mapped network drive on Windows.
The error message is misleading, because there is an actual error in the logs, but the error displayed to the user is "Must be a Git repository" (which the directory actually is)
How to reproduce
Expected behavior
Repo is added successfully
Relevant log output
The text was updated successfully, but these errors were encountered: