diff --git a/services/pull/pull.go b/services/pull/pull.go index 169b6799ad..ea2310ca91 100644 --- a/services/pull/pull.go +++ b/services/pull/pull.go @@ -4,6 +4,7 @@ package pull import ( + "bytes" "context" "fmt" "io" @@ -428,9 +429,11 @@ func checkIfPRContentChanged(ctx context.Context, pr *issues_model.PullRequest, return false, fmt.Errorf("unable to open pipe for to run diff: %w", err) } + stderr := new(bytes.Buffer) if err := cmd.Run(&git.RunOpts{ Dir: prCtx.tmpBasePath, Stdout: stdoutWriter, + Stderr: stderr, PipelineFunc: func(ctx context.Context, cancel context.CancelFunc) error { _ = stdoutWriter.Close() defer func() { @@ -442,6 +445,7 @@ func checkIfPRContentChanged(ctx context.Context, pr *issues_model.PullRequest, if err == util.ErrNotEmpty { return true, nil } + err = git.ConcatenateError(err, stderr.String()) log.Error("Unable to run diff on %s %s %s in tempRepo for PR[%d]%s/%s...%s/%s: Error: %v", newCommitID, oldCommitID, base,