mirror of
https://github.com/go-gitea/gitea
synced 2025-07-10 04:27:22 +00:00
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>
This commit is contained in:
@ -21,7 +21,7 @@ import (
|
||||
func (repo *Repository) GetLanguageStats(commitID string) (map[string]int64, error) {
|
||||
// We will feed the commit IDs in order into cat-file --batch, followed by blobs as necessary.
|
||||
// so let's create a batch stdin and stdout
|
||||
batchStdinWriter, batchReader, cancel := CatFileBatch(repo.Path)
|
||||
batchStdinWriter, batchReader, cancel := repo.CatFileBatch()
|
||||
defer cancel()
|
||||
|
||||
writeID := func(id string) error {
|
||||
|
Reference in New Issue
Block a user