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

Allow for git clone --recurse-submodules for GitSource #355

Open
Downsite opened this issue Dec 15, 2023 · 3 comments
Open

Allow for git clone --recurse-submodules for GitSource #355

Downsite opened this issue Dec 15, 2023 · 3 comments

Comments

@Downsite
Copy link

Because of caching, if one tries to clone a repository that makes use of relative paths in .gitmodules, git submodule update will fail. That is because the repository url is changed automatically.

$ git submodule init
Submodule 'dep/mydep' (/home/user/.julia/packages/BinaryBuilderBase/hosj0/deps/downloads/public/mydep.git) registered for path 'dep/mydep'
$ git submodule update
fatal: repository '/home/user/.julia/packages/BinaryBuilderBase/hosj0/deps/downloads/public/mydep.git' does not exist
fatal: clone of '/home/user/.julia/packages/BinaryBuilderBase/hosj0/deps/downloads/public/mydep.git' into submodule path '/workspace/srcdir/myproj/dep/mydep' failed'

An option to allow to add flags to git clone would help here.

@giordano
Copy link
Member

We don't use git for cloning but libgit2, which as far as I understand doesn't allow managing submodules.

@Downsite
Copy link
Author

A (diry?) workaround is to use git remote set-url origin in the build script.

@giordano
Copy link
Member

We don't use git for cloning but libgit2, which as far as I understand doesn't allow managing submodules.

To be clearer, I think it's the julia's LibGit2.jl standard library which doesn't expose the submodules management, which is present in libgit2

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

No branches or pull requests

2 participants