]> source.dussan.org Git - gitea.git/commitdiff
Remove spurious DataAsync Error logging (#14599)
authorzeripath <art27@cantab.net>
Sun, 7 Feb 2021 21:04:58 +0000 (21:04 +0000)
committerGitHub <noreply@github.com>
Sun, 7 Feb 2021 21:04:58 +0000 (21:04 +0000)
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>
modules/git/blob_nogogit.go

index 731f7d06e8a608a314c2ba4bc21f3d63e57aaab6..e917a316195d1202e359bd8e1f34e31cffafb3af 100644 (file)
@@ -11,8 +11,6 @@ import (
        "io"
        "strconv"
        "strings"
-
-       gitea_log "code.gitea.io/gitea/modules/log"
 )
 
 // 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"))
                if err != nil {
                        err = ConcatenateError(err, stderr.String())
-                       gitea_log.Error("Blob.DataAsync Error: %v", err)
                        _ = stdoutWriter.CloseWithError(err)
                } else {
                        _ = stdoutWriter.Close()