(repo *git.Repository, authMethod transport.AuthMethod)
| 667 | } |
| 668 | |
| 669 | func syncRemoteReferences(repo *git.Repository, authMethod transport.AuthMethod) error { |
| 670 | if err := repo.Fetch(&git.FetchOptions{Auth: authMethod, RemoteName: "origin"}); err != nil && !errors.Is(err, git.NoErrAlreadyUpToDate) { |
| 671 | return err |
| 672 | } |
| 673 | return nil |
| 674 | } |
| 675 | |
| 676 | // resolveRemoteDefaultBranch queries the origin remote to determine the remote's default branch |
| 677 | // (the target of HEAD) and returns the corresponding local branch reference name (e.g. refs/heads/master). |
no outgoing calls
no test coverage detected