feature<Cleanup>: add toolbar button to run git gc and git lfs prune

This commit is contained in:
leo 2022-02-10 14:27:46 +08:00
parent bc404de937
commit b04c94ccc1
9 changed files with 103 additions and 1 deletions

21
src/Commands/GC.cs Normal file
View file

@ -0,0 +1,21 @@
using System;
namespace SourceGit.Commands {
/// <summary>
/// GC
/// </summary>
public class GC : Command {
private Action<string> handler;
public GC(string repo, Action<string> onProgress) {
Cwd = repo;
Args = "gc";
TraitErrorAsOutput = true;
handler = onProgress;
}
public override void OnReadline(string line) {
handler?.Invoke(line);
}
}
}