diff options
author | zeripath <art27@cantab.net> | 2021-05-10 02:27:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 03:27:03 +0200 |
commit | 270aab429ef025df9a0b9bf9e3982729ae8df449 (patch) | |
tree | 215550ee5938876d4caf8516777d6f4bcaa91b40 /modules/git/repo_blob_test.go | |
parent | 038e1db4dfc7a7fc0a8675f66f6be9a3dd5f10c2 (diff) | |
download | gitea-270aab429ef025df9a0b9bf9e3982729ae8df449.tar.gz gitea-270aab429ef025df9a0b9bf9e3982729ae8df449.zip |
On open repository open common cat file batch and batch-check (#15667)
Use common git cat-file --batch and git cat-file --batch-check to
significantly reduce calls to git.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/git/repo_blob_test.go')
-rw-r--r-- | modules/git/repo_blob_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/repo_blob_test.go b/modules/git/repo_blob_test.go index 52a124db2a..ccf418b305 100644 --- a/modules/git/repo_blob_test.go +++ b/modules/git/repo_blob_test.go @@ -33,9 +33,9 @@ func TestRepository_GetBlob_Found(t *testing.T) { dataReader, err := blob.DataAsync() assert.NoError(t, err) - defer dataReader.Close() data, err := ioutil.ReadAll(dataReader) + assert.NoError(t, dataReader.Close()) assert.NoError(t, err) assert.Equal(t, testCase.Data, data) } |