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:
@@ -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 {
|
func (self *RemoteCommands) DeleteRemoteTag(task gocui.Task, remoteName string, tagName string) error {
|
||||||
cmdArgs := NewGitCmd("push").
|
cmdArgs := NewGitCmd("push").
|
||||||
Arg(remoteName, "--delete", tagName).
|
Arg(remoteName, "--delete", "refs/tags/"+tagName).
|
||||||
ToArgv()
|
ToArgv()
|
||||||
|
|
||||||
return self.cmd.New(cmdArgs).PromptOnCredentialRequest(task).Run()
|
return self.cmd.New(cmdArgs).PromptOnCredentialRequest(task).Run()
|
||||||
|
|||||||
@@ -45,14 +45,8 @@ var DeleteRemoteTagWhenBranchWithSameNameExists = NewIntegrationTest(NewIntegrat
|
|||||||
Content(Equals("Are you sure you want to delete the remote tag 'xyz' from 'origin'?")).
|
Content(Equals("Are you sure you want to delete the remote tag 'xyz' from 'origin'?")).
|
||||||
Confirm()
|
Confirm()
|
||||||
|
|
||||||
/* EXPECTED:
|
|
||||||
t.ExpectToast(Equals("Remote tag deleted"))
|
t.ExpectToast(Equals("Remote tag deleted"))
|
||||||
|
|
||||||
t.Shell().AssertRemoteTagNotFound("origin", "xyz")
|
t.Shell().AssertRemoteTagNotFound("origin", "xyz")
|
||||||
ACTUAL: */
|
|
||||||
t.ExpectPopup().Alert().
|
|
||||||
Title(Equals("Error")).
|
|
||||||
Content(Contains("error: dst refspec xyz matches more than one")).
|
|
||||||
Confirm()
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user