builder/remotecontext/git/gitutils.go
Method gitRepo.clone
has 7 return statements (exceeds 4 allowed). Open
Open
func (repo gitRepo) clone() (checkoutDir string, err error) {
fetch := fetchArgs(repo.remote, repo.ref)
root, err := os.MkdirTemp("", "docker-build-git")
if err != nil {
Method gitRepo.checkout
has 5 return statements (exceeds 4 allowed). Open
Open
func (repo gitRepo) checkout(root string) (string, error) {
// Try checking out by ref name first. This will work on branches and sets
// .git/HEAD to the current branch name
if output, err := repo.gitWithinDir(root, "checkout", repo.ref); err != nil {
// If checking out by branch name fails check out the last fetched ref