-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
"cargo new" executed in a drive root hangs #4091
Comments
Thanks for the report! This is likely coming from libgit2 and is probably a bug in libgit2, but it'd be great if we could work around it. If you've got a reliable reproduction of this it'd be great if you could help out debugging! If we could get a backtrace that'd be invaluable for figuring out what's going wrong here. |
I've traced this back and confirmed that it is a bug in libgit2. It's a loop in git_discover_repository caused by bugs in libgit2s path implementation. It's known and fixed in the latest versions of libgit2: I'm not sure if there's any reasonable workaround beyond updating to the latest version of libgit2, short of implementing a manual version of repo scanning. |
Oh, it's worth noting that I'm pretty sure the title of the issue, which says this only happens on directories other than C;\ is just wrong - reviewing the fixes, there's no reason I can see why c:\ is special and bugs reported against other libgit2 language bindings correctly identify it happening in any drive root. Further, the fix itself uses C:\ as its test case. |
Oh excellent! I'll go update libgit2 so we can get that bugfix. Thanks so much for investigating! |
Picks up a fix for rust-lang/cargo#4091
This should include a fix for rust-lang/cargo#4091 with an updated version of libgit2. Closes rust-lang/cargo#4091
Ok I've published libgit2-sys 0.6.11 which should have this fix, I've sent a PR to rust-lang/rust to update the lockfile as well. |
…tsakis Updated locked version of libgit2 This should include a fix for rust-lang/cargo#4091 with an updated version of libgit2. Closes rust-lang/cargo#4091
…tsakis Updated locked version of libgit2 This should include a fix for rust-lang/cargo#4091 with an updated version of libgit2. Closes rust-lang/cargo#4091
…tsakis Updated locked version of libgit2 This should include a fix for rust-lang/cargo#4091 with an updated version of libgit2. Closes rust-lang/cargo#4091
…tsakis Updated locked version of libgit2 This should include a fix for rust-lang/cargo#4091 with an updated version of libgit2. Closes rust-lang/cargo#4091
This should include a fix for rust-lang/cargo#4091 with an updated version of libgit2. Closes rust-lang/cargo#4091
Updated locked version of libgit2 This should include a fix for rust-lang/cargo#4091 with an updated version of libgit2. Closes rust-lang/cargo#4091
Executing cargo new directly in a drive root on Windows (eg, C:\ or D:) causes cargo to hang indefinitely at 100% CPU usage. Watching file access using ProcMon shows it attempting to open .git and objects directories, making me think that it's trying to scan upwards for a parent git repo.
Possibly related to #3783?
The text was updated successfully, but these errors were encountered: