Skip to content

Commit

Permalink
Merge pull request #3095 from buildkite/chore/quiet-rev-parse-check
Browse files Browse the repository at this point in the history
Don't surface expected stderr output from git rev-parse
  • Loading branch information
CerealBoy authored Nov 18, 2024
2 parents 68fac8d + 09b44b6 commit e15f910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/job/checkout.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func hasGitSubmodules(sh *shell.Shell) bool {

func hasGitCommit(ctx context.Context, sh *shell.Shell, gitDir string, commit string) bool {
// Resolve commit to an actual commit object
output, err := sh.Command("git", "--git-dir", gitDir, "rev-parse", commit+"^{commit}").RunAndCaptureStdout(ctx)
output, err := sh.Command("git", "--git-dir", gitDir, "rev-parse", commit+"^{commit}").RunAndCaptureStdout(ctx, shell.ShowStderr(false))
if err != nil {
return false
}
Expand Down

0 comments on commit e15f910

Please sign in to comment.