mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
style: add .editorconfig for code formatting. see issu #25
This commit is contained in:
parent
a8eeea4f78
commit
18aaa0a143
225 changed files with 7781 additions and 3911 deletions
|
@ -1,10 +1,14 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace SourceGit.Commands {
|
||||
public class LFS {
|
||||
class PruneCmd : Command {
|
||||
public PruneCmd(string repo, Action<string> onProgress) {
|
||||
namespace SourceGit.Commands
|
||||
{
|
||||
public class LFS
|
||||
{
|
||||
class PruneCmd : Command
|
||||
{
|
||||
public PruneCmd(string repo, Action<string> onProgress)
|
||||
{
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
Args = "lfs prune";
|
||||
|
@ -12,18 +16,21 @@ namespace SourceGit.Commands {
|
|||
_outputHandler = onProgress;
|
||||
}
|
||||
|
||||
protected override void OnReadline(string line) {
|
||||
protected override void OnReadline(string line)
|
||||
{
|
||||
_outputHandler?.Invoke(line);
|
||||
}
|
||||
|
||||
private Action<string> _outputHandler;
|
||||
private readonly Action<string> _outputHandler;
|
||||
}
|
||||
|
||||
public LFS(string repo) {
|
||||
public LFS(string repo)
|
||||
{
|
||||
_repo = repo;
|
||||
}
|
||||
|
||||
public bool IsEnabled() {
|
||||
public bool IsEnabled()
|
||||
{
|
||||
var path = Path.Combine(_repo, ".git", "hooks", "pre-push");
|
||||
if (!File.Exists(path)) return false;
|
||||
|
||||
|
@ -31,10 +38,11 @@ namespace SourceGit.Commands {
|
|||
return content.Contains("git lfs pre-push");
|
||||
}
|
||||
|
||||
public void Prune(Action<string> outputHandler) {
|
||||
public void Prune(Action<string> outputHandler)
|
||||
{
|
||||
new PruneCmd(_repo, outputHandler).Exec();
|
||||
}
|
||||
|
||||
private string _repo;
|
||||
private readonly string _repo;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue