fix refspec for remote branch

This commit is contained in:
Tim Schubert 2022-05-31 22:11:43 +02:00
parent 9f4056f34d
commit b015a0c71e
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA

View file

@ -123,9 +123,12 @@ func Push(
auth *githttp.BasicAuth,
remote *git.Remote,
) error {
refspec := fmt.Sprintf("+refs/heads/*:refs/heads/%s/*", DefaultRemoteName)
return remote.Push(&git.PushOptions{
RemoteName: DefaultRemoteName,
Auth: auth,
RefSpecs: []config.RefSpec { config.RefSpec(refspec) },
})
}