mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
code_review: PR #1093
Merge deleting branch and tag on remote into `SourceGit.Commands.Push(repo, remote, refname, isDelete)` Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
9645b65db6
commit
c8bee2f6ba
5 changed files with 13 additions and 21 deletions
|
@ -43,13 +43,14 @@ namespace SourceGit.ViewModels
|
|||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
bool succ = true;
|
||||
var succ = true;
|
||||
var tag = $"refs/tags/{Target.Name}";
|
||||
if (_pushAllRemotes)
|
||||
{
|
||||
foreach (var remote in _repo.Remotes)
|
||||
{
|
||||
SetProgressDescription($"Pushing tag to remote {remote.Name} ...");
|
||||
succ = new Commands.Push(_repo.FullPath, remote.Name, Target.Name, false).Exec();
|
||||
succ = new Commands.Push(_repo.FullPath, remote.Name, tag, false).Exec();
|
||||
if (!succ)
|
||||
break;
|
||||
}
|
||||
|
@ -57,7 +58,7 @@ namespace SourceGit.ViewModels
|
|||
else
|
||||
{
|
||||
SetProgressDescription($"Pushing tag to remote {SelectedRemote.Name} ...");
|
||||
succ = new Commands.Push(_repo.FullPath, SelectedRemote.Name, Target.Name, false).Exec();
|
||||
succ = new Commands.Push(_repo.FullPath, SelectedRemote.Name, tag, false).Exec();
|
||||
}
|
||||
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue