MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / syncRemoteReferences

Function syncRemoteReferences

internal/store/gitstore.go:669–674  ·  view source on GitHub ↗
(repo *git.Repository, authMethod transport.AuthMethod)

Source from the content-addressed store, hash-verified

667}
668
669func 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).

Calls

no outgoing calls

Tested by

no test coverage detected