Fixed the autocomplete crash, root cause: getDocumentSymbols() accessed mDocs from a worker thread while document lifecycle callbacks could concurrently modify the same unordered_set, corrupting its internal state.

Added a synthetic “Working Tree / Index” first row whenever the selected repository has local or staged changes.
Displays separate changed and staged counts.
Updates dynamically from normal status refreshes without reloading commit history.
Selecting it opens the shared details view in “Uncommitted changes” mode.
Shows tracked changes from HEAD through the working tree, plus untracked-file patches.
Supports both sidebar and detached History views.
The History shortcut focuses working changes when present, otherwise the newest commit.
Added the History button beside Refresh.
Added consistent 2dp spacing between the ref dropdown and both buttons.
Added translations for the new labels.
This commit is contained in:
Martín Lucas Golini
2026-08-29 03:12:27 -03:00
parent 61d9d3c7bc
commit b3d72b5acf
14 changed files with 412 additions and 57 deletions
+6 -1
View File
@@ -190,8 +190,10 @@ class GitPlugin : public PluginBase {
Tools::UIDiffView::ViewMode viewMode{ Tools::UIDiffView::ViewMode::Unified };
bool messageExpanded{ false };
bool filesCollapsed{ false };
bool workingTree{ false };
void openCommitDetails( GitPlugin& plugin, const Git::Commit& commit, bool detached );
void openCommitDetails( GitPlugin& plugin, const Git::Commit& commit, bool detached,
bool workingTree = false );
void loadCommitFiles( GitPlugin& plugin, bool detached );
@@ -216,6 +218,7 @@ class GitPlugin : public PluginBase {
viewMode = Tools::UIDiffView::ViewMode::Unified;
messageExpanded = false;
filesCollapsed = false;
workingTree = false;
}
};
struct DetachedHistoryState {
@@ -374,6 +377,7 @@ class GitPlugin : public PluginBase {
void activateHistoryIndex( const ModelIndex& index, bool expand );
void openCommitDetails( const Git::Commit& commit );
void openWorkingTreeDetails( bool detached );
void showGitHistory( const Git::Commit* commit = nullptr );
@@ -382,6 +386,7 @@ class GitPlugin : public PluginBase {
void openHistoryMenu( const ModelIndex& index );
void openDetachedCommitDetails( const Git::Commit& commit );
void ensureDetachedCommitDetailsHost();
std::string detachedHistoryTitle();