feature: add worktree support (#205)

This commit is contained in:
leo 2024-06-27 18:25:16 +08:00
parent 43af8c49a1
commit 8a8aabede3
No known key found for this signature in database
23 changed files with 959 additions and 21 deletions

View file

@ -0,0 +1,28 @@
using System.Threading.Tasks;
namespace SourceGit.ViewModels
{
public class PruneWorktrees : Popup
{
public PruneWorktrees(Repository repo)
{
_repo = repo;
View = new Views.PruneWorktrees() { DataContext = this };
}
public override Task<bool> Sure()
{
_repo.SetWatcherEnabled(false);
ProgressDescription = "Prune worktrees ...";
return Task.Run(() =>
{
new Commands.Worktree(_repo.FullPath).Prune(SetProgressDescription);
CallUIThread(() => _repo.SetWatcherEnabled(true));
return true;
});
}
private Repository _repo = null;
}
}