-
-
Notifications
You must be signed in to change notification settings - Fork 894
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
git.Repo.clone_from() not working correctly in WSL #1902
Comments
Thanks for reporting. Even though I couldn't reproduce it, I wouldn't be surprised if something is going wrong here. It might be that it doesn't recognise the path as absolute, and makes it absolute by pre-pending the CWD all by itself (which it shouldn't have to do at all). |
Indeed with relative paths it looks like it is working correctly, but still it would be nice if it worked correctly with absolute paths as well. In my project I think I will be able to get around this issue, but if I have time I will look into your repo and propose some changes! |
I am using GitPython both in windows and WSL and I noticed that paths are not handled coherently between the two (i.e. C:/ vs /mnt/c). It is possible to go around it most of the time using
wslpath
and converting from Windows to WSL and vice versa but it looks that the clone_from() ends up raising an exception regardless if theto_path
is in WSL format or Windows format.Steps to reproduce:
Expected behaviour:
When the script is launched from a python instance running on WSL the repo is cloned in
$PWD/gitpython
.Actual behaviour:
The text was updated successfully, but these errors were encountered: