mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-25 11:24:02 +08:00
refactor: implementation to delete branches
This commit is contained in:
@@ -52,14 +52,17 @@ namespace SourceGit.ViewModels
|
||||
{
|
||||
if (Target.IsLocal)
|
||||
{
|
||||
Commands.Branch.Delete(_repo.FullPath, Target.Name);
|
||||
Commands.Branch.DeleteLocal(_repo.FullPath, Target.Name);
|
||||
|
||||
if (_alsoDeleteTrackingRemote && TrackingRemoteBranch != null)
|
||||
new Commands.Push(_repo.FullPath, TrackingRemoteBranch.Remote, TrackingRemoteBranch.Name).Exec();
|
||||
{
|
||||
SetProgressDescription("Deleting tracking remote branch...");
|
||||
Commands.Branch.DeleteRemote(_repo.FullPath, TrackingRemoteBranch.Remote, TrackingRemoteBranch.Name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
new Commands.Push(_repo.FullPath, Target.Remote, Target.Name).Exec();
|
||||
Commands.Branch.DeleteRemote(_repo.FullPath, Target.Remote, Target.Name);
|
||||
}
|
||||
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
|
||||
Reference in New Issue
Block a user