Expand Git History actions and branch management

- Add SmartGit-inspired context actions to Git History commits, including checkout, merge, fast-forward merge, cherry-pick, revert, branch creation, tag creation, and copying commit IDs or complete messages.
  - Order commit actions into consistent operation, ref-creation, and clipboard groups. Hide the redundant Show in Git History action inside detached history tabs while retaining it in the source-control sidebar.
  - Add a Working Tree / Index context menu with status-aware Commit and Stage actions. Track staged and unstaged availability in the history model and keep it synchronized as repository status changes.
  - Extend the Git command wrapper with operations for creating branches at commits, creating and deleting tags, deleting remote branches, cherry-picking commits, and reverting commits.
  - Support deleting tags and remote branches from the Branches view. When deleting a local branch with an upstream, optionally delete its tracked remote branch as part of the operation.
  - Add confirmation and input dialogs for branch, tag, remote-deletion, and revert workflows. Disable history-changing commit actions while another Git operation is active.
This commit is contained in:
Martín Lucas Golini
2026-08-29 15:11:08 -03:00
parent b3d72b5acf
commit 0fa99ab9d2
11 changed files with 395 additions and 14 deletions
+12 -1
View File
@@ -377,15 +377,25 @@ 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 );
void focusDetachedHistory();
void openHistoryMenu( const ModelIndex& index );
void openHistoryMenu( const ModelIndex& index, bool showHistoryAction );
void addTag( const Git::Commit& commit );
void createBranchAtCommit( const Git::Commit& commit );
void revertCommit( const Git::Commit& commit );
bool canStartGitOperation();
void openDetachedCommitDetails( const Git::Commit& commit );
void ensureDetachedCommitDetailsHost();
std::string detachedHistoryTitle();
@@ -414,6 +424,7 @@ class GitPlugin : public PluginBase {
GitConflictSession* conflictSession( const std::string& repoPath );
GitConflictSession* activeConflictSession();
bool updateConflictSessions( UnorderedMap<std::string, Git::ConflictState>& conflictStates );
void menuAdd( UIMenu* menu, const std::string& cmd, const std::string& text,