Skip to content

feat: list stashes from git submodules#166

Open
rtheil wants to merge 2 commits into
artrz:mainfrom
rtheil:feat/submodule-support
Open

feat: list stashes from git submodules#166
rtheil wants to merge 2 commits into
artrz:mainfrom
rtheil:feat/submodule-support

Conversation

@rtheil

@rtheil rtheil commented Jun 15, 2026

Copy link
Copy Markdown

Discover initialized submodules (recursively) under each workspace repository and surface their stashes in the explorer, the same way top-level repositories are handled.

  • GitWorkspace.getRepositories() appends submodule working-tree paths via git submodule status --recursive, skipping uninitialized submodules (which have no working tree and thus no stashes).
  • Gated behind a new gitstash.advanced.includeSubmodules setting (default: true).
  • NodeFactory labels nested repositories (submodules / depth-found repos) by their workspace-relative path instead of the workspace folder name, so they are distinguishable from the superproject.

Closes #97

rtheil added 2 commits June 15, 2026 07:51
Discover initialized submodules (recursively) under each workspace
repository and surface their stashes in the explorer, the same way
top-level repositories are handled.

- GitWorkspace.getRepositories() appends submodule working-tree paths
  via `git submodule status --recursive`, skipping uninitialized
  submodules (which have no working tree and thus no stashes).
- Gated behind a new `gitstash.advanced.includeSubmodules` setting
  (default: true).
- NodeFactory labels nested repositories (submodules / depth-found
  repos) by their workspace-relative path instead of the workspace
  folder name, so they are distinguishable from the superproject.

Closes artrz#97
The file watcher only monitored `<repo>/.git/refs`, but a submodule's
`.git` is a file pointing to `.git/modules/<name>`, so that directory
doesn't exist and no watcher was registered. As a result, creating or
dropping a stash inside a submodule never refreshed the tree.

Resolve the real git directory from the `.git` file (which also covers
linked worktrees) and watch its `refs` directory instead.
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.

Add support for submodule stash listing

1 participant