aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/compare.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/compare.go')
-rw-r--r--routers/repo/compare.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/routers/repo/compare.go b/routers/repo/compare.go
index 7046f3ecdb..a658374d9b 100644
--- a/routers/repo/compare.go
+++ b/routers/repo/compare.go
@@ -10,7 +10,6 @@ import (
"errors"
"fmt"
"html"
- "io/ioutil"
"net/http"
"path"
"path/filepath"
@@ -117,14 +116,7 @@ func setCsvCompareContext(ctx *context.Context) {
}
defer reader.Close()
- b, err := ioutil.ReadAll(reader)
- if err != nil {
- return nil, err
- }
-
- b = charset.ToUTF8WithFallback(b)
-
- return csv_module.CreateReaderAndGuessDelimiter(b), nil
+ return csv_module.CreateReaderAndGuessDelimiter(charset.ToUTF8WithFallbackReader(reader))
}
baseReader, err := csvReaderFromCommit(baseCommit)