feat: git clone recursive submodules option#1488
Merged
pascalbreuninger merged 1 commit intoloft-sh:mainfrom Dec 19, 2024
Merged
feat: git clone recursive submodules option#1488pascalbreuninger merged 1 commit intoloft-sh:mainfrom
pascalbreuninger merged 1 commit intoloft-sh:mainfrom
Conversation
47e43ba to
ffb9327
Compare
Member
|
@charlysotelo Thanks for your contribution, I'll take a look at it. I'm not the biggest fan of submodules in general but this seems to be a pretty interesting use case |
pascalbreuninger
approved these changes
Dec 18, 2024
Member
There was a problem hiding this comment.
LGTM overall 🙌
I'm curious if we could enable this by default but to answer this we'll have to do some digging into git clone performance with the --recurse-submodules flag set
The lint pipeline failure should be resolved if you rebase your branch onto the latest main
ffb9327 to
73d7c95
Compare
Contributor
Author
|
Thank you! I've gone ahead and rebased. As for enabling it by default, I'd suggest punting on that question and if enabling it by default is desired, just do so on a new minor semantic version. |
pascalbreuninger
approved these changes
Dec 19, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-submodulesoption to remedy this.To this aim, I've refactored
git/clone.gowith 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.