mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-09-22 13:01:05 +03:00
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:
@@ -155,6 +155,8 @@ GitHistoryModel::workingTreeNode( const Git::Status& status, const std::string&
|
||||
}
|
||||
auto item = std::make_unique<Node>();
|
||||
item->type = NodeType::WorkingTree;
|
||||
item->hasWorkingTreeChanges = changed > 0;
|
||||
item->hasStagedChanges = staged > 0;
|
||||
item->subject = mPlugin->i18n( "git_working_tree_index", "Working Tree / Index" );
|
||||
item->message = String::format(
|
||||
mPlugin->i18n( "git_working_tree_summary", "%zu changed, %zu staged" ).toUtf8(), changed,
|
||||
@@ -234,6 +236,8 @@ void GitHistoryModel::setWorkingTreeStatus( const Git::Status& status,
|
||||
} else if ( hasItem && item ) {
|
||||
mRoots.front()->message = std::move( item->message );
|
||||
mRoots.front()->tooltip = std::move( item->tooltip );
|
||||
mRoots.front()->hasWorkingTreeChanges = item->hasWorkingTreeChanges;
|
||||
mRoots.front()->hasStagedChanges = item->hasStagedChanges;
|
||||
}
|
||||
invalidate( Model::DontInvalidateIndexes );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user