2024-02-05 23:08:37 -08:00
|
|
|
|
using System;
|
2021-05-26 03:58:34 -07:00
|
|
|
|
|
2021-04-29 05:05:55 -07:00
|
|
|
|
namespace SourceGit.Commands {
|
|
|
|
|
public class Merge : Command {
|
2024-02-05 23:08:37 -08:00
|
|
|
|
public Merge(string repo, string source, string mode, Action<string> outputHandler) {
|
|
|
|
|
_outputHandler = outputHandler;
|
|
|
|
|
WorkingDirectory = repo;
|
|
|
|
|
Context = repo;
|
2021-05-26 03:58:34 -07:00
|
|
|
|
TraitErrorAsOutput = true;
|
2024-02-05 23:08:37 -08:00
|
|
|
|
Args = $"merge --progress {source} {mode}";
|
2021-05-26 03:58:34 -07:00
|
|
|
|
}
|
|
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
|
protected override void OnReadline(string line) {
|
|
|
|
|
_outputHandler?.Invoke(line);
|
2021-04-29 05:05:55 -07:00
|
|
|
|
}
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
|
|
private Action<string> _outputHandler = null;
|
2021-04-29 05:05:55 -07:00
|
|
|
|
}
|
|
|
|
|
}
|