1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 16:03:07 +03:00

Fix deleting a remote tag when a remote branch with the same name exists

This commit is contained in:
Stefan Haller
2025-11-27 19:52:18 +01:00
parent 7809823064
commit 11a6a73be5
2 changed files with 1 additions and 7 deletions

View File

@@ -61,7 +61,7 @@ func (self *RemoteCommands) DeleteRemoteBranch(task gocui.Task, remoteName strin
func (self *RemoteCommands) DeleteRemoteTag(task gocui.Task, remoteName string, tagName string) error {
cmdArgs := NewGitCmd("push").
Arg(remoteName, "--delete", tagName).
Arg(remoteName, "--delete", "refs/tags/"+tagName).
ToArgv()
return self.cmd.New(cmdArgs).PromptOnCredentialRequest(task).Run()

View File

@@ -45,14 +45,8 @@ var DeleteRemoteTagWhenBranchWithSameNameExists = NewIntegrationTest(NewIntegrat
Content(Equals("Are you sure you want to delete the remote tag 'xyz' from 'origin'?")).
Confirm()
/* EXPECTED:
t.ExpectToast(Equals("Remote tag deleted"))
t.Shell().AssertRemoteTagNotFound("origin", "xyz")
ACTUAL: */
t.ExpectPopup().Alert().
Title(Equals("Error")).
Content(Contains("error: dst refspec xyz matches more than one")).
Confirm()
},
})