1
1
mirror of https://github.com/cooperspencer/gickup synced 2024-09-18 23:01:35 +02:00

Error on second push (#166)

* there is an error on second push if the repo has only one branch

* fixed fetch error message
This commit is contained in:
Andreas Wachter 2023-08-17 08:06:10 +02:00 committed by GitHub
parent f8ad43bb29
commit 4fac8115ff
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -440,10 +440,11 @@ func TempClone(repo types.Repo, tempdir string) (*git.Repository, error) {
err = r.Fetch(&git.FetchOptions{
RefSpecs: []config.RefSpec{"refs/*:refs/*"},
})
if err != nil {
if err == git.NoErrAlreadyUpToDate {
return r, nil
} else {
return r, err
}
return r, nil
}
func CreateRemotePush(repo *git.Repository, destination types.GenRepo, url string) error {