implement basic support for repos with git submodules#233
Draft
implement basic support for repos with git submodules#233
Conversation
fixes #161 Creating integration test for Git submodule support with comprehensive test cases Fixing the unused import issue in the submodule test Updated the test to allow file protocol for git submodules in tests Implementing submodule support by adding initializeSubmodules function and calling it in initializeWorktree and propagateToWorktree Adding protocol.file.allow=always to the WithRepository git config setup Setting the global git config for protocol.file.allow in the test setup Modified test to use relative paths within the same repository for submodules instead of external file URLs Simplified test to manually create submodule structure instead of using git submodule commands, focusing on testing the core functionality Removing unused ctx variable Adding back the missing repository import Formatting code to ensure consistent style Implementing the templating approach for submodule .git files - initialize once in worktree, template back during export Creating comprehensive user-focused tests that test real workflows with submodules, not implementation details Removing the unused filepath import Modifying the Create method to use the worktree directory directly instead of going through Git operations that might try to handle submodules Restoring the original Create method - the issue is that Dagger's AsGit operations try to handle submodules and fail with file:// URLs Creating realistic submodule tests that avoid the file:// URL issue by using manual structure and optional real HTTPS submodules Removing the unused os import Formatting the code to ensure consistent style
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.
fixes #161
needs some cleanup still, but this makes container-use work for dagger.io.
it creates a kind of weird in-between state inside the container where .gitmodules exists but .git does not, but it's enough to unblock.