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

Function shouldFallbackToCurrentBranch

internal/store/gitstore.go:742–748  ·  view source on GitHub ↗
(repo *git.Repository, err error)

Source from the content-addressed store, hash-verified

740}
741
742func shouldFallbackToCurrentBranch(repo *git.Repository, err error) bool {
743 if !errors.Is(err, transport.ErrAuthenticationRequired) && !errors.Is(err, transport.ErrEmptyRemoteRepository) {
744 return false
745 }
746 _, headErr := repo.Head()
747 return headErr == nil
748}
749
750// checkoutRemoteDefaultBranch ensures the working tree is checked out to the remote's default branch
751// (the branch target of origin/HEAD). If the local branch does not exist it will be created to track

Callers 1

EnsureRepositoryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected