mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
refactor<*>: rewrite all with AvaloniaUI
This commit is contained in:
parent
0136904612
commit
2a62596999
521 changed files with 19780 additions and 23244 deletions
|
@ -1,21 +1,19 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace SourceGit.Commands {
|
||||
/// <summary>
|
||||
/// 合并分支
|
||||
/// </summary>
|
||||
public class Merge : Command {
|
||||
private Action<string> handler = null;
|
||||
|
||||
public Merge(string repo, string source, string mode, Action<string> onProgress) {
|
||||
Cwd = repo;
|
||||
Args = $"merge --progress {source} {mode}";
|
||||
public Merge(string repo, string source, string mode, Action<string> outputHandler) {
|
||||
_outputHandler = outputHandler;
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
TraitErrorAsOutput = true;
|
||||
handler = onProgress;
|
||||
Args = $"merge --progress {source} {mode}";
|
||||
}
|
||||
|
||||
public override void OnReadline(string line) {
|
||||
handler?.Invoke(line);
|
||||
protected override void OnReadline(string line) {
|
||||
_outputHandler?.Invoke(line);
|
||||
}
|
||||
|
||||
private Action<string> _outputHandler = null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue