summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_commands/remote.go
diff options
context:
space:
mode:
authorFederico <federicogerardi94@gmail.com>2023-08-10 09:39:26 +0200
committerGitHub <noreply@github.com>2023-08-10 17:39:26 +1000
commit0df5cb1286a1f6fb442789ea8afacf7cdcd53735 (patch)
treead63ebac448f657320a1dcfb2b6adf8bc93d7aa2 /pkg/commands/git_commands/remote.go
parentc43830b0271374ab42e83771479bf757ba34839c (diff)
Allow deleting remote tags/branches from local tag/branch views (#2738)
Diffstat (limited to 'pkg/commands/git_commands/remote.go')
-rw-r--r--pkg/commands/git_commands/remote.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/commands/git_commands/remote.go b/pkg/commands/git_commands/remote.go
index b9f20fb3a..ce8f79442 100644
--- a/pkg/commands/git_commands/remote.go
+++ b/pkg/commands/git_commands/remote.go
@@ -56,6 +56,14 @@ func (self *RemoteCommands) DeleteRemoteBranch(task gocui.Task, remoteName strin
return self.cmd.New(cmdArgs).PromptOnCredentialRequest(task).WithMutex(self.syncMutex).Run()
}
+func (self *RemoteCommands) DeleteRemoteTag(task gocui.Task, remoteName string, tagName string) error {
+ cmdArgs := NewGitCmd("push").
+ Arg(remoteName, "--delete", tagName).
+ ToArgv()
+
+ return self.cmd.New(cmdArgs).PromptOnCredentialRequest(task).WithMutex(self.syncMutex).Run()
+}
+
// CheckRemoteBranchExists Returns remote branch
func (self *RemoteCommands) CheckRemoteBranchExists(branchName string) bool {
cmdArgs := NewGitCmd("show-ref").