-
Notifications
You must be signed in to change notification settings - Fork 204
/
Copy pathLFSPull.cs
41 lines (34 loc) · 1019 Bytes
/
LFSPull.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System.Collections.Generic;
using System.Threading.Tasks;
namespace SourceGit.ViewModels
{
public class LFSPull : Popup
{
public List<Models.Remote> Remotes => _repo.Remotes;
public Models.Remote SelectedRemote
{
get;
set;
}
public LFSPull(Repository repo)
{
_repo = repo;
SelectedRemote = _repo.Remotes[0];
}
public override Task<bool> Sure()
{
_repo.SetWatcherEnabled(false);
ProgressDescription = $"Pull LFS objects from remote ...";
var log = _repo.CreateLog("LFS Pull");
Use(log);
return Task.Run(() =>
{
new Commands.LFS(_repo.FullPath).Pull(SelectedRemote.Name, log);
log.Complete();
CallUIThread(() => _repo.SetWatcherEnabled(true));
return true;
});
}
private readonly Repository _repo = null;
}
}