feature: merge multiple heads (#793)

* feature: allow merging multiple heads
* feature: allow merging multiple branches from branch tree
This commit is contained in:
Dmitrij D. Czarkoff 2024-12-09 13:04:25 +00:00 committed by GitHub
parent c9c7fb5d5b
commit dce33fdf60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 232 additions and 10 deletions

View file

@ -13,6 +13,7 @@ using Avalonia.Media.Imaging;
using Avalonia.Threading;
using CommunityToolkit.Mvvm.ComponentModel;
using SourceGit.Models;
namespace SourceGit.ViewModels
{
@ -950,6 +951,12 @@ namespace SourceGit.ViewModels
PopupHost.ShowPopup(new DeleteMultipleBranches(this, branches, isLocal));
}
public void MergeMultipleBranches(List<Models.Branch> branches)
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new MergeMultiple(this, branches.ConvertAll(b => _histories?.Commits?.Find(c => c.SHA == b.Head))));
}
public void CreateNewTag()
{
if (_currentBranch == null)