You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
One gitlink without a .gitmodules entry makes Submodules() report every submodule as Unknown with no checked-out SHA #191
GitSubmoduleListBuilder.ApplyStatusAsync (GitIntegration/Builders/GitSubmoduleListBuilder.cs ~L115-130) runs a single git submodule status for the whole repository and, if it fails, returns the gitlinks unannotated.
Failure scenario (reproduced on git 2.43)
Someone commits a nested repository directly (git's "embedded repository" warning), creating a gitlink with no .gitmodules mapping:
ls-files --stage -z lists 160000 … inner
git submodule status dies: fatal: no submodule mapping found in .gitmodules for path 'inner', exit 128
every submodule, including correctly configured ones, comes back with State = Unknown and CheckedOutSha = null.
Why it matters
One stray gitlink wipes the state of every healthy submodule, with nothing telling the caller why. Tools that decide whether to run UpdateSubmodules based on state then act on no information.
Suggested fix
Run git submodule status -- <path> for the mapped gitlinks only (skipping paths absent from .gitmodules), or on failure retry per path, so only the unmapped entry stays Unknown.
Acceptance criteria
Integration test: a repo with one configured submodule and one unmapped gitlink reports the configured one's real state and SHA, and the unmapped one as Unknown.
Priority: Medium. It needs an unusual repository state: a gitlink with no .gitmodules mapping, usually an accidentally committed embedded repo. When that state exists, every healthy submodule loses its state and SHA, and nothing tells the caller why.
Area / suggested assignment:GitSubmoduleListBuilder.ApplyStatusAsync. Run status only for the mapped paths, or retry each path on failure.
Activity
matt-edmondson commentedon Oct 7, 2026
Triage
.gitmodulesmapping, usually an accidentally committed embedded repo. When that state exists, every healthy submodule loses its state and SHA, and nothing tells the caller why.GitSubmoduleListBuilder.ApplyStatusAsync. Run status only for the mapped paths, or retry each path on failure.--porcelainsilently forces recursion off, overriding git's on-demand default and the user's config #189 (also submodule handling), but the code path is different. No open PR covers it.Generated by Claude Code