forked from sourcegit-scm/sourcegit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDropStash.cs
More file actions
32 lines (26 loc) · 749 Bytes
/
Copy pathDropStash.cs
File metadata and controls
32 lines (26 loc) · 749 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
using System.Threading.Tasks;
namespace SourceGit.ViewModels
{
public class DropStash : Popup
{
public Models.Stash Stash { get; }
public DropStash(Repository repo, Models.Stash stash)
{
_repo = repo;
Stash = stash;
}
public override Task<bool> Sure()
{
ProgressDescription = $"Dropping stash: {Stash.Name}";
var log = _repo.CreateLog("Drop Stash");
Use(log);
return Task.Run(() =>
{
new Commands.Stash(_repo.FullPath).Use(log).Drop(Stash.Name);
log.Complete();
return true;
});
}
private readonly Repository _repo;
}
}