aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/repo_language_stats_nogogit.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-10-08 01:20:53 +0800
committerGitHub <noreply@github.com>2022-10-08 01:20:53 +0800
commitc08e42c47ef2a32b3b7ee422c73d6929c93b199e (patch)
tree7425d3fa27e7ac65de4f251ed22db1511b21adc4 /modules/git/repo_language_stats_nogogit.go
parent69fc510d6dcf9cda7993eae8cd5c7725b345a9a1 (diff)
downloadgitea-c08e42c47ef2a32b3b7ee422c73d6929c93b199e.tar.gz
gitea-c08e42c47ef2a32b3b7ee422c73d6929c93b199e.zip
Refactor parseTreeEntries, speed up tree list (#21368)
Close #20315 (fix the panic when parsing invalid input), Speed up #20231 (use ls-tree without size field) Introduce ListEntriesRecursiveFast (ls-tree without size) and ListEntriesRecursiveWithSize (ls-tree with size)
Diffstat (limited to 'modules/git/repo_language_stats_nogogit.go')
-rw-r--r--modules/git/repo_language_stats_nogogit.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/repo_language_stats_nogogit.go b/modules/git/repo_language_stats_nogogit.go
index d237924f92..7388ef403b 100644
--- a/modules/git/repo_language_stats_nogogit.go
+++ b/modules/git/repo_language_stats_nogogit.go
@@ -57,7 +57,7 @@ func (repo *Repository) GetLanguageStats(commitID string) (map[string]int64, err
tree := commit.Tree
- entries, err := tree.ListEntriesRecursive()
+ entries, err := tree.ListEntriesRecursiveWithSize()
if err != nil {
return nil, err
}