mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
feature<Cleanup>: add toolbar button to run git gc
and git lfs prune
This commit is contained in:
parent
bc404de937
commit
b04c94ccc1
9 changed files with 103 additions and 1 deletions
21
src/Commands/GC.cs
Normal file
21
src/Commands/GC.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue