forked from gitea/gitea
1
0
Fork 0

Remove spurious DataAsync Error logging (#14599)

Breaking the pipe is a valid way of killing a piped command and any error from
a broken cat-file batch command should be passed back up to the writer any way
therefore specifically logging it is unnecessary.

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath 2021-02-07 21:04:58 +00:00 committed by GitHub
parent 5f248d0df2
commit e65cfabda7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -11,8 +11,6 @@ import (
"io" "io"
"strconv" "strconv"
"strings" "strings"
gitea_log "code.gitea.io/gitea/modules/log"
) )
// Blob represents a Git object. // Blob represents a Git object.
@ -35,7 +33,6 @@ func (b *Blob) DataAsync() (io.ReadCloser, error) {
err := NewCommand("cat-file", "--batch").RunInDirFullPipeline(b.repoPath, stdoutWriter, stderr, strings.NewReader(b.ID.String()+"\n")) err := NewCommand("cat-file", "--batch").RunInDirFullPipeline(b.repoPath, stdoutWriter, stderr, strings.NewReader(b.ID.String()+"\n"))
if err != nil { if err != nil {
err = ConcatenateError(err, stderr.String()) err = ConcatenateError(err, stderr.String())
gitea_log.Error("Blob.DataAsync Error: %v", err)
_ = stdoutWriter.CloseWithError(err) _ = stdoutWriter.CloseWithError(err)
} else { } else {
_ = stdoutWriter.Close() _ = stdoutWriter.Close()