Skip to content

Commit 11a6a73

Browse files
committed
Fix deleting a remote tag when a remote branch with the same name exists
1 parent 7809823 commit 11a6a73

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

pkg/commands/git_commands/remote.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (self *RemoteCommands) DeleteRemoteBranch(task gocui.Task, remoteName strin
6161

6262
func (self *RemoteCommands) DeleteRemoteTag(task gocui.Task, remoteName string, tagName string) error {
6363
cmdArgs := NewGitCmd("push").
64-
Arg(remoteName, "--delete", tagName).
64+
Arg(remoteName, "--delete", "refs/tags/"+tagName).
6565
ToArgv()
6666

6767
return self.cmd.New(cmdArgs).PromptOnCredentialRequest(task).Run()

pkg/integration/tests/tag/delete_remote_tag_when_branch_with_same_name_exists.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,8 @@ var DeleteRemoteTagWhenBranchWithSameNameExists = NewIntegrationTest(NewIntegrat
4545
Content(Equals("Are you sure you want to delete the remote tag 'xyz' from 'origin'?")).
4646
Confirm()
4747

48-
/* EXPECTED:
4948
t.ExpectToast(Equals("Remote tag deleted"))
5049

5150
t.Shell().AssertRemoteTagNotFound("origin", "xyz")
52-
ACTUAL: */
53-
t.ExpectPopup().Alert().
54-
Title(Equals("Error")).
55-
Content(Contains("error: dst refspec xyz matches more than one")).
56-
Confirm()
5751
},
5852
})

0 commit comments

Comments
 (0)