mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 13:45:00 +00:00
enhance: Git LFS support
This commit is contained in:
parent
e731807c91
commit
9a0b10bd9c
24 changed files with 780 additions and 34 deletions
28
src/ViewModels/LFSPrune.cs
Normal file
28
src/ViewModels/LFSPrune.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using System.Threading.Tasks;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class LFSPrune : Popup
|
||||
{
|
||||
public LFSPrune(Repository repo)
|
||||
{
|
||||
_repo = repo;
|
||||
View = new Views.LFSPrune() { DataContext = this };
|
||||
}
|
||||
|
||||
public override Task<bool> Sure()
|
||||
{
|
||||
_repo.SetWatcherEnabled(false);
|
||||
ProgressDescription = "LFS prune ...";
|
||||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
new Commands.LFS(_repo.FullPath).Prune(SetProgressDescription);
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
private readonly Repository _repo = null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue