mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
feature<Merge>: show progress for merge
This commit is contained in:
parent
67f5eed9a0
commit
763779b529
2 changed files with 12 additions and 3 deletions
|
@ -1,12 +1,21 @@
|
|||
using System;
|
||||
|
||||
namespace SourceGit.Commands {
|
||||
/// <summary>
|
||||
/// 合并分支
|
||||
/// </summary>
|
||||
public class Merge : Command {
|
||||
private Action<string> handler = null;
|
||||
|
||||
public Merge(string repo, string source, string mode) {
|
||||
public Merge(string repo, string source, string mode, Action<string> onProgress) {
|
||||
Cwd = repo;
|
||||
Args = $"merge {source} {mode}";
|
||||
Args = $"merge --progress {source} {mode}";
|
||||
TraitErrorAsOutput = true;
|
||||
handler = onProgress;
|
||||
}
|
||||
|
||||
public override void OnReadline(string line) {
|
||||
handler?.Invoke(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue