feat: list stashes from git submodules#166
Open
rtheil wants to merge 2 commits into
Open
Conversation
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.
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.
Discover initialized submodules (recursively) under each workspace repository and surface their stashes in the explorer, the same way top-level repositories are handled.
git submodule status --recursive, skipping uninitialized submodules (which have no working tree and thus no stashes).gitstash.advanced.includeSubmodulessetting (default: true).Closes #97