-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
When trying to push a tag to remote that has the same branch name, it will fail with:
error: src refspec <tag name> matches more than one
error: failed to push some refs to <Remote git url>
Because it is using the command git push <remote> <tag name>, which doesn't specify it is pushing a tag.
To Reproduce
Steps to reproduce the behavior:
- Create a branch with an arbitrary name and push to remote
- Go to tag tab and create a tag with the same name as you created the branch
- Push the tag
- See error
Expected behavior
Tag should be pushed
Screenshots
None for now, can provide one if failed to reproduce.
Version info:
Run lazygit --version and paste the result here
commit=v0.36.0, build date=2022-11-15T07:26:07Z, build source=binaryRelease, version=0.36.0, os=linux, arch=amd64, git version=2.38.1
Run git --version and paste the result here
git version 2.38.1
Additional context
None for now.
Note: please try updating to the latest version or manually building the latest master to see if the issue still occurs.
Check code below, don't think it matters but can do so later if needed.
func (self *TagCommands) Push(remoteName string, tagName string) error {
- return self.cmd.New(fmt.Sprintf("git push %s %s", self.cmd.Quote(remoteName), self.cmd.Quote(tagName))).PromptOnCredentialRequest().WithMutex(self.syncMutex).Run()
+ return self.cmd.New(fmt.Sprintf("git push %s tag %s", self.cmd.Quote(remoteName), self.cmd.Quote(tagName))).PromptOnCredentialRequest().WithMutex(self.syncMutex).Run()
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers