feature: supports merge selected commit to current branch (#800)

This commit is contained in:
leo 2024-12-12 10:03:34 +08:00
parent e17b53da42
commit 2053ce033d
No known key found for this signature in database
7 changed files with 41 additions and 3 deletions

View file

@ -513,6 +513,21 @@ namespace SourceGit.ViewModels
e.Handled = true;
};
menu.Items.Add(cherryPick);
if (!commit.HasDecorators)
{
var merge = new MenuItem();
merge.Header = new Views.NameHighlightedTextBlock("CommitCM.Merge", current.Name);
merge.Icon = App.CreateMenuIcon("Icons.Merge");
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(_repo, commit, current.Name));
e.Handled = true;
};
menu.Items.Add(merge);
}
}
else
{