mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
refactor: implementation to delete branches
This commit is contained in:
parent
5eea54dbf8
commit
8fea9fecfb
3 changed files with 27 additions and 29 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue