feature: git command logs

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-04-17 12:30:20 +08:00
parent 928a0ad3c5
commit 8b39df32cc
No known key found for this signature in database
101 changed files with 1040 additions and 573 deletions

View file

@ -1,23 +1,12 @@
using System;
namespace SourceGit.Commands
namespace SourceGit.Commands
{
public class GC : Command
{
public GC(string repo, Action<string> outputHandler)
public GC(string repo)
{
_outputHandler = outputHandler;
WorkingDirectory = repo;
Context = repo;
TraitErrorAsOutput = true;
Args = "gc --prune=now";
}
protected override void OnReadline(string line)
{
_outputHandler?.Invoke(line);
}
private readonly Action<string> _outputHandler;
}
}