using System;
namespace SourceGit.Commands {
///
/// 存档命令
///
public class Archive : Command {
private Action handler;
public Archive(string repo, string revision, string to, Action onProgress) {
Cwd = repo;
Args = $"archive --format=zip --verbose --output=\"{to}\" {revision}";
TraitErrorAsOutput = true;
handler = onProgress;
}
public override void OnReadline(string line) {
handler?.Invoke(line);
}
}
}