-
Notifications
You must be signed in to change notification settings - Fork 788
file: protocol support on Windows doesn't appear to work #415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while. This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed. We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active. Thanks for your understanding and cooperation! |
To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while. This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed. We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active. Thanks for your understanding and cooperation! |
* adjust path extracted from file: url on Windows Fixes #415
* adjust path extracted from file: url on Windows Fixes go-git#415
I'm trying to use go-git with a file: protocol on Windows.
So my URL is something like "file:///c:/directory".
This parses correctly, host is "" (correctly), but the curiosity with windows file uRLs is that the path is then "/c:/directory".
This path is then passed to the git command line directly, and git then fails to clone.
It gives the appearance of working if you use a file url of "file://c:/directory", so only two slashes.
It only appears to work though, as the URL is parsed as "c" being the host, and "/directory" being the path. So it works as long as your current drive is "c:".
The logic for converting file: URLs into actual usable windows file paths has to be something like "if windows and path starts slash, letter, colon, slash, then remove the leading slash".
Note that you can't use windows file paths in go-git without using the URL form, as it interprets it as an scp like URL and not a file path.
The text was updated successfully, but these errors were encountered: