Skip to content
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

Submodules should be init and updated, not cloned #260

Open
egonzalf opened this issue Nov 22, 2018 · 4 comments
Open

Submodules should be init and updated, not cloned #260

egonzalf opened this issue Nov 22, 2018 · 4 comments
Labels
feature a feature request or enhancement

Comments

@egonzalf
Copy link

Cloning submodules is not considereing the git commit of such repo.
The current procedure parses the .gitmodules file, which it only references the url and optionally a branch and the clones using that info., thus getting the HEAD of such branch.
The git submodule update --init --recursive should get the correct commit for each submodule.

@egonzalf
Copy link
Author

A fix to this issue could also resolve #236

@jimhester
Copy link
Member

jimhester commented Nov 27, 2018

We can't simply use git submodule update --init --recursive, the zip archives from GitHub are not actually git repositories (they don't have a .git directory at all).

If the specific commit information is not stored in the .gitmodules file there is not really a way for us to retrieve it, although maybe there is something in the GitHub API we could potentially use...

@egonzalf
Copy link
Author

I guess you have your reasons on downloading instead of cloning, or maybe that is a behaviour of git2r. However, when using git='external' it will clone the repo. Maybe in such situation it could be cloned with submodules, or get the submodules on the next step.

@jimhester
Copy link
Member

install_github() does not rely on any git client, external or git2r.

For install_git() we could potentially do this for the external git client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants