forked from sourcegit-scm/sourcegit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeleteRemote.cs
More file actions
38 lines (31 loc) · 909 Bytes
/
DeleteRemote.cs
File metadata and controls
38 lines (31 loc) · 909 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
37
38
using System.Threading.Tasks;
namespace SourceGit.ViewModels
{
public class DeleteRemote : Popup
{
public Models.Remote Remote
{
get;
private set;
}
public DeleteRemote(Repository repo, Models.Remote remote)
{
_repo = repo;
Remote = remote;
}
public override async Task<bool> Sure()
{
using var lockWatcher = _repo.LockWatcher();
ProgressDescription = "Deleting remote ...";
var log = _repo.CreateLog("Delete Remote");
Use(log);
var succ = await new Commands.Remote(_repo.FullPath)
.Use(log)
.DeleteAsync(Remote.Name);
log.Complete();
_repo.MarkBranchesDirtyManually();
return succ;
}
private readonly Repository _repo = null;
}
}