feat: git clone recursive submodules option #1488
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all -- amazing tool folks. Great work.
My use case involves using git submodules to reuse a .devcontainer directory across many git projects. Devpod currently fails as before this PR there is no way to do this. This PR aims to add a
git-clone-recursive-submodules
option to remedy this.To this aim, I've refactored
git/clone.go
with the options pattern, which should make any future git option updates trivial, and implemented the passing of this option as one of them.I set up a little test repo with the scenario:
https://github.com/charlysotelo/devcontainer-submodule-test
Here you can see the tool currently failing to find my submoduled .devcontainer/devcontainer.json (and falling back to using a go devcontainer):
Here it is shown working with this PR:
While I'm not new to golang, this is my first time contributing to an open-source project, so your patience and feedback on the PR is appreciated.
Cheers.