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

@ -4,13 +4,15 @@ namespace SourceGit.Commands
{
public class Merge : Command
{
public Merge(string repo, string source, string mode, Action<string> outputHandler)
public Merge(string repo, string source, string mode, string strategy, Action<string> outputHandler)
{
_outputHandler = outputHandler;
WorkingDirectory = repo;
Context = repo;
TraitErrorAsOutput = true;
Args = $"merge --progress {source} {mode}";
if (strategy != null)
strategy = string.Concat("--strategy=", strategy);
Args = $"merge --progress {strategy} {source} {mode}";
}
protected override void OnReadline(string line)