2022-02-09 22:27:46 -08:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace SourceGit.Commands {
|
|
|
|
|
public class GC : Command {
|
2024-02-05 23:08:37 -08:00
|
|
|
|
public GC(string repo, Action<string> outputHandler) {
|
|
|
|
|
_outputHandler = outputHandler;
|
|
|
|
|
WorkingDirectory = repo;
|
|
|
|
|
Context = repo;
|
2022-02-09 22:27:46 -08:00
|
|
|
|
TraitErrorAsOutput = true;
|
2024-02-05 23:08:37 -08:00
|
|
|
|
Args = "gc";
|
2022-02-09 22:27:46 -08:00
|
|
|
|
}
|
|
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
|
protected override void OnReadline(string line) {
|
|
|
|
|
_outputHandler?.Invoke(line);
|
2022-02-09 22:27:46 -08:00
|
|
|
|
}
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
|
|
private Action<string> _outputHandler;
|
2022-02-09 22:27:46 -08:00
|
|
|
|
}
|
|
|
|
|
}
|