mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 09:24:23 +00:00
Merge pull request #3032 from Shell32-Natsu/default-branch
remove default master branch in cloner
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user