-
Notifications
You must be signed in to change notification settings - Fork 386
Expand file tree
/
Copy pathPruneRemote.cs
More file actions
36 lines (29 loc) · 856 Bytes
/
PruneRemote.cs
File metadata and controls
36 lines (29 loc) · 856 Bytes
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
using System.Threading.Tasks;
namespace SourceGit.ViewModels
{
public class PruneRemote : Popup
{
public Models.Remote Remote
{
get;
}
public PruneRemote(Repository repo, Models.Remote remote)
{
_repo = repo;
Remote = remote;
}
public override async Task<bool> Sure()
{
using var lockWatcher = _repo.LockWatcher();
ProgressDescription = "Run `prune` on remote ...";
var log = _repo.CreateLog($"Prune Remote '{Remote.Name}'");
Use(log);
var succ = await new Commands.Remote(_repo.FullPath)
.Use(log)
.PruneAsync(Remote.Name);
log.Complete();
return succ;
}
private readonly Repository _repo = null;
}
}