mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
30 lines
863 B
C#
30 lines
863 B
C#
using System.Threading.Tasks;
|
|
|
|
namespace SourceGit.Views.Popups {
|
|
/// <summary>
|
|
/// 清理远程已删除分支
|
|
/// </summary>
|
|
public partial class Prune : Controls.PopupWidget {
|
|
private string repo = null;
|
|
private string remote = null;
|
|
|
|
public Prune(string repo, string remote) {
|
|
this.repo = repo;
|
|
this.remote = remote;
|
|
InitializeComponent();
|
|
}
|
|
|
|
public override string GetTitle() {
|
|
return App.Text("RemoteCM.Prune");
|
|
}
|
|
|
|
public override Task<bool> Start() {
|
|
return Task.Run(() => {
|
|
Models.Watcher.SetEnabled(repo, false);
|
|
var succ = new Commands.Remote(repo).Prune(remote);
|
|
Models.Watcher.SetEnabled(repo, true);
|
|
return succ;
|
|
});
|
|
}
|
|
}
|
|
}
|