Skip to content

git-clone: Import repositories with uninitialized submodules - #1

Merged
abhinav merged 1 commit into
bracesdev:mainfrom
abhinav:preserve-submodule-pins
Nov 17, 2026
Merged

abhinav merged 1 commit into
bracesdev:mainfrom
abhinav:preserve-submodule-pins

Conversation

@abhinav

@abhinav abhinav commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

git-clone previously rejected a source tree containing a submodule,
so even layers that only touched sibling files could not use it.
The projection now records each submodule at the commit pinned by the
source and leaves its working directory empty.
Layers can patch sibling files while the submodule repository is offline.

Layerctl does not fetch or check out submodule contents.
Editing a submodule or updating its pin through layerctl is unsupported.
The import copies .gitmodules verbatim to the clone destination.
To initialize a submodule later with Git, nested imports may need a path
entry in the projection's root .gitmodules, and relative URLs may need
adjustment for the projection's remote.

`git-clone` previously rejected a source tree containing a submodule,
so even layers that only touched sibling files could not use it.
The projection now records each submodule at the commit pinned by the
source and leaves its working directory empty.
Layers can patch sibling files while the submodule repository is offline.

Layerctl does not fetch or check out submodule contents.
Editing a submodule or updating its pin through layerctl is unsupported.
The import copies `.gitmodules` verbatim to the clone destination.
To initialize a submodule later with Git, nested imports may need a path
entry in the projection's root `.gitmodules`, and relative URLs may need
adjustment for the projection's remote.
@abhinav

abhinav commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

This change is part of the following stack:

Change managed by git-spice.

@abhinav
abhinav merged commit d28bde7 into bracesdev:main Nov 17, 2026
1 check passed
@abhinav
abhinav deleted the preserve-submodule-pins branch November 17, 2026 23:13
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

Successfully merging this pull request may close these issues.

2 participants