Skip to content

Commit

Permalink
sweet/harnesses: make git less chatty more
Browse files Browse the repository at this point in the history
In CL 600060, I made most calls to git less chatty, but missed one.

Change-Id: Ieec2b7216467c5d5f40a25c20506eca945fa6ada
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/600115
Auto-Submit: Austin Clements <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
  • Loading branch information
aclements authored and gopherbot committed Jul 22, 2024
1 parent f8da0b7 commit 302fed1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sweet/harnesses/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import (
)

func gitShallowClone(dir, url, ref string) error {
cmd := exec.Command("git", "clone", "--depth", "1", "-b", ref, url, dir)
// Git 2.46+ has a global --no-advice flag, but that's extremely recent as of this writing.
cmd := exec.Command("git", "-c", "advice.detachedHead=false", "clone", "--depth", "1", "-b", ref, url, dir)
log.TraceCommand(cmd, false)
cmd.Stderr = os.Stderr
_, err := cmd.Output()
Expand All @@ -28,7 +29,6 @@ func gitRecursiveCloneToCommit(dir, url, branch, hash string) error {
if _, err := cloneCmd.Output(); err != nil {
return err
}
// Git 2.46+ has a global --no-advice flag, but that's extremely recent as of this writing.
checkoutCmd := exec.Command("git", "-C", dir, "-c", "advice.detachedHead=false", "checkout", hash)
log.TraceCommand(checkoutCmd, false)
checkoutCmd.Stderr = os.Stderr
Expand Down

0 comments on commit 302fed1

Please sign in to comment.