Skip to content

Adds basic support for Git submodules#4960

Open
eamodio wants to merge 1 commit intomainfrom
feature/submodules
Open

Adds basic support for Git submodules#4960
eamodio wants to merge 1 commit intomainfrom
feature/submodules

Conversation

@eamodio
Copy link
Member

@eamodio eamodio commented Feb 6, 2026

Improves the handling of Git submodules by treating them as first-class repository entities alongside worktrees. This update ensures that submodules (that are discovered by VS Code) are correctly identified and provides better visual differentiation within the user interface.

Key Enhancements

  • Submodule Discovery: Enhances repository tracking by identifying nested submodules using rev-parse and tracking parent repository relationships.
  • Improved UI/UX: Distinguishes submodules in the repository tree and quick picks with specific icons and tooltips.
  • Contextual Menu Control: Updates menu "when" clauses to filter out submodule-specific files from certain actions where they are not yet supported, such as file-level sharing or deep linking.
  • Diff & Navigation: Adds logic to handle 160000 file modes, allowing for better navigation and diffing of subproject commits.

Closes #1048, #1803

@eamodio eamodio self-assigned this Feb 6, 2026
@eamodio eamodio added this to the 17.10 milestone Feb 6, 2026
@eamodio eamodio requested a review from ianhattendorf February 6, 2026 05:13
@eamodio
Copy link
Member Author

eamodio commented Feb 6, 2026

There are many caveats and gaps here — this gets some basic submodule support to largely align with VS Code's support.

@augmentcode
Copy link

augmentcode bot commented Feb 6, 2026

🤖 Augment PR Summary

Summary: Adds first-class support for Git submodules alongside worktrees, improving discovery, UI differentiation, and diff/navigation behavior.

Key Changes:

  • Enhances repo discovery via a single rev-parse call that also captures a submodule’s superproject working tree.
  • Extends revision URIs with submoduleSha metadata and updates best-revision resolution to accept Uri inputs.
  • Updates diff commands to detect submodule working SHAs and generate appropriate diff URIs/titles.
  • Improves git log parsing by switching to --raw to capture file modes (e.g., 160000) for submodule detection.
  • Adjusts filesystem provider behavior to render submodule entries as Subproject commit <sha> and to treat gitlinks as files.
  • Adds status parsing/propagation of submodule indicators and threads mode/submodule info through file change models.
  • Updates views, icons, tooltips, and context values to visually distinguish submodules.
  • Restricts unsupported actions via menu when clauses for submodule file items.
  • Adds telemetry for opened submodule counts and a dedicated log-parser test suite covering mode/submodule scenarios.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

 - Improves repository discovery and tracking by identifying submodules alongside worktrees
 - Enhances the UI with specific icons and tooltips to distinguish submodules within the repository tree and quick picks
 - Ensures that when a repository is opened via SCM, nested submodules can be automatically detected
@eamodio eamodio force-pushed the feature/submodules branch from e214d57 to 57a06e7 Compare February 6, 2026 15:43
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.

GitLens cannot display submodule diffs

1 participant