mirror of
https://github.com/openshift/source-to-image.git
synced 2026-02-05 12:44:54 +01:00
@@ -38,7 +38,7 @@ func TestCloneWithContext(t *testing.T) {
|
||||
if filepath.ToSlash(fs.RemoveDirName) != "upload/tmp" {
|
||||
t.Errorf("Expected to remove the upload/tmp directory")
|
||||
}
|
||||
if !reflect.DeepEqual(cr.Args, []string{"checkout", "ref1"}) {
|
||||
if !reflect.DeepEqual(cr.Args, []string{"checkout", "--quiet", "ref1"}) {
|
||||
t.Errorf("Unexpected command arguments: %#v", cr.Args)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
log "github.com/golang/glog"
|
||||
|
||||
"github.com/openshift/source-to-image/pkg/api"
|
||||
s2ierr "github.com/openshift/source-to-image/pkg/errors"
|
||||
"github.com/openshift/source-to-image/pkg/util"
|
||||
@@ -516,7 +518,10 @@ func (h *stiGit) Checkout(repo, ref string) error {
|
||||
Stderr: os.Stderr,
|
||||
Dir: repo,
|
||||
}
|
||||
return h.RunWithOptions(opts, "git", "checkout", ref)
|
||||
if log.V(1) {
|
||||
return h.RunWithOptions(opts, "git", "checkout", ref)
|
||||
}
|
||||
return h.RunWithOptions(opts, "git", "checkout", "--quiet", ref)
|
||||
}
|
||||
|
||||
// SubmoduleInit initializes/clones submodules
|
||||
|
||||
@@ -195,7 +195,7 @@ func TestGitCheckout(t *testing.T) {
|
||||
if ch.Name != "git" {
|
||||
t.Errorf("Unexpected command name: %q", ch.Name)
|
||||
}
|
||||
if !reflect.DeepEqual(ch.Args, []string{"checkout", "ref1"}) {
|
||||
if !reflect.DeepEqual(ch.Args, []string{"checkout", "--quiet", "ref1"}) {
|
||||
t.Errorf("Unexpected command arguments: %#v", ch.Args)
|
||||
}
|
||||
if ch.Opts.Dir != "repo1" {
|
||||
|
||||
Reference in New Issue
Block a user