mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Stop using git count-objects and use raw directory size for repository (#8848)
* Migrate from git count-objects to a raw directory size * As per @guillep2k ignore unusual files
This commit is contained in:
parent
44ec9b933a
commit
ee1d64ddd1
4 changed files with 26 additions and 8 deletions
|
@ -60,9 +60,9 @@ func addRepoSize(x *xorm.Engine) (err error) {
|
|||
}
|
||||
|
||||
repoPath := filepath.Join(setting.RepoRootPath, strings.ToLower(user.Name), strings.ToLower(repo.Name)) + ".git"
|
||||
countObject, err := git.GetRepoSize(repoPath)
|
||||
countObject, err := git.CountObjects(repoPath)
|
||||
if err != nil {
|
||||
log.Warn("GetRepoSize: %v", err)
|
||||
log.Warn("CountObjects: %v", err)
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue