-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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_fetch_with_cli does not fetch submodules with cli #7202
Comments
I'm not quite sure if that's the bug here, it looks like we're attempting to parse submodule urls as a |
That's a good point, its not necessarily the fetch command failing but the flag that enables it should also cause |
Yeah I think we probably just need to pass a |
Allow git dependency with shorthand ssh submodules to work. If a submodule is defined with a shorthand ssh url (like `[email protected]/user/repo.git`), then cargo was choking on it trying to convert it to a URL. The fix is to just pass around strings. An alternate solution would be to try to detect shorthand git urls and automatically add `ssh://` to the path. I'm concerned about matching git's heuristics for this, though. I'm willing to try if you think this would be better, though. I can't think of a good way to write a test for this, since we don't have any SSH test infrastructure. I verified running locally against github. Closes #7202
Problem
I’m having an issue fetching private ssh submodules with git. I dug around and found this commit which adds the option to fetch urls with the system git. However, it appears to only handle parents and any submodules are handled by this line which effectively still uses
libgit2
.Steps
proj = { git = https://path }
cargo build
Possible Solution(s)
My options to fix this appear to be:
proj2
a submodule inproj1
. This will work for this particular library but not some of the others my team is working on due to workspaces.I’m willing to work on this if no one has time, but I need some guidance as to how to best approach it.
Notes
Output of
cargo version
: cargo 1.36.0 (c4fcfb7 2019-05-15)The text was updated successfully, but these errors were encountered: