-
-
Notifications
You must be signed in to change notification settings - Fork 162
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 submodules #83
Comments
i totally think we should do this! my only thought is- should this be default behavior or a flag- any thoughts @roblabla or @killercup ? i can't imagine that doing it by default would cause issue, but i also rarely use git submodules so don't have a ton of experience to draw on here. open to either! |
By default, git does not clone submodules because it can take a large amount of time to clone, and might not be necessary. But in the context of a template, IMO the default should be to clone it. I can't imagine a case where a template would have a submodule the author didn't intend to get cloned. Curious to hear if anyone has a use-case for a non-cloned submodule in a template though. |
yeah i tend to agree with you @roblabla - let's leave this open for a few days and see if there's any comments. otherwise i'm quite happy to accept a PR for this (if you are interested- go for it!) |
I just checked the Maybe, first, we can check if the repository contains submodules - if it does, we can use The first solution, and the most simpler one, is to let the developer explain the situation in the template's README. The second solution, and the most complex one, is to clone the template, check if it contains submodules, and so init and clone recursively all the submodules manually. What do you think of that? |
@ashleygwilliams Actually, I just read your thoughts about removing Otherwise, I don't know what is the behaviour of |
@k0pernicus i think we will hold off a bit longer on replacing libgit2- after talking briefly with @alexcrichton it seems that libgit2 does still have some benefit- particularly for Windows users. i'll need to talk a little more with him about the tradeoffs (mostly that installing cargo-generate is a bit unfun) - if you'd like to proceed with the because you asked, in my experience |
No problem. |
yup! that's great. i should note that i was planning on doing a release today- let me know what your time constraints are. if we think we can get this in today that'd be awesome, but i don't want to put too much pressure. let me know! |
@ashleygwilliams I can work on it right now ;) |
closed by #104 - thanks @k0pernicus ! @roblabla we'll be making a release tomorrow- please try that out as it should resolve your issue! closing this now, please file an issue if you run into any problems! |
Currently, cargo-generate ignores git submodules (does not clone them recursively). I'm working on a Rust toolchain for the Nintendo Switch, and I'd like to have my template contain a git submodule for my fork of the rust stdlibd.
I believe cargo generate should clone templates recursively.
The text was updated successfully, but these errors were encountered: