mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if repoSpec.Ref == "" {
|
|
||||||
repoSpec.Ref = "master"
|
|
||||||
}
|
|
||||||
cmd := exec.Command(
|
cmd := exec.Command(
|
||||||
gitProgram,
|
gitProgram,
|
||||||
"clone",
|
"clone",
|
||||||
@@ -45,6 +42,7 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
|
|||||||
repoSpec.CloneSpec(), repoSpec.Dir.String())
|
repoSpec.CloneSpec(), repoSpec.Dir.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if repoSpec.Ref != "" {
|
||||||
cmd = exec.Command(
|
cmd = exec.Command(
|
||||||
gitProgram,
|
gitProgram,
|
||||||
"fetch",
|
"fetch",
|
||||||
@@ -68,6 +66,7 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
|
|||||||
log.Printf("Error checking out ref: %s", out)
|
log.Printf("Error checking out ref: %s", out)
|
||||||
return errors.Wrapf(err, "trouble checking out %s", repoSpec.Ref)
|
return errors.Wrapf(err, "trouble checking out %s", repoSpec.Ref)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cmd = exec.Command(
|
cmd = exec.Command(
|
||||||
gitProgram,
|
gitProgram,
|
||||||
|
|||||||
Reference in New Issue
Block a user