Merge pull request #3032 from Shell32-Natsu/default-branch

remove default master branch in cloner
This commit is contained in:
Jeff Regan
2020-09-25 17:01:54 -07:00
committed by GitHub

View File

@@ -27,9 +27,6 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
return err
}
if repoSpec.Ref == "" {
repoSpec.Ref = "master"
}
cmd := exec.Command(
gitProgram,
"clone",
@@ -45,6 +42,7 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
repoSpec.CloneSpec(), repoSpec.Dir.String())
}
if repoSpec.Ref != "" {
cmd = exec.Command(
gitProgram,
"fetch",
@@ -68,6 +66,7 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
log.Printf("Error checking out ref: %s", out)
return errors.Wrapf(err, "trouble checking out %s", repoSpec.Ref)
}
}
cmd = exec.Command(
gitProgram,