forked from sourcegit-scm/sourcegit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClearStashes.cs
More file actions
31 lines (25 loc) · 735 Bytes
/
ClearStashes.cs
File metadata and controls
31 lines (25 loc) · 735 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
using System.Threading.Tasks;
namespace SourceGit.ViewModels
{
public class ClearStashes : Popup
{
public ClearStashes(Repository repo)
{
_repo = repo;
}
public override async Task<bool> Sure()
{
using var lockWatcher = _repo.LockWatcher();
ProgressDescription = "Clear all stashes...";
var log = _repo.CreateLog("Clear Stashes");
Use(log);
await new Commands.Stash(_repo.FullPath)
.Use(log)
.ClearAsync();
log.Complete();
_repo.MarkStashesDirtyManually();
return true;
}
private readonly Repository _repo = null;
}
}