Commit 3d28f4b2 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Merge branch 'make-git-init-to-be-quiet' into 'master'

Make git init to be quiet

See merge request !1383
parents 74d738a0 bc2c4e7f
Pipeline #64142003 failed with stages
in 45 minutes and 20 seconds
......@@ -77,6 +77,12 @@ func (b *AbstractShell) writeGitCleanup(w ShellWriter, build *common.Build) {
func (b *AbstractShell) writeRefspecFetchCmd(w ShellWriter, build *common.Build, projectDir string, gitDir string) {
depth := build.GitInfo.Depth
if depth > 0 {
w.Notice("Fetching changes with git depth set to %d...", depth)
} else {
w.Notice("Fetching changes...")
}
// initializing
templateDir := w.MkTmpDir("git-template")
templateFile := path.Join(templateDir, "config")
......@@ -90,13 +96,6 @@ func (b *AbstractShell) writeRefspecFetchCmd(w ShellWriter, build *common.Build,
w.Cd(projectDir)
b.writeGitCleanup(w, build)
// fetching
if depth > 0 {
w.Notice("Fetching changes with git depth set to %d...", depth)
} else {
w.Notice("Fetching changes...")
}
// Add `git remote` or update existing
w.IfCmd("git", "remote", "add", "origin", build.GetRemoteURL())
w.Notice("Created fresh repository.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment