forgejo/modules/indexer
Lunny Xiao 0ca13c5eae
[PORT] Refactor the usage of batch catfile (gitea#31754)
When opening a repository, it will call `ensureValidRepository` and also
`CatFileBatch`. But sometimes these will not be used until repository
closed. So it's a waste of CPU to invoke 3 times git command for every
open repository.

This PR removed all of these from `OpenRepository` but only kept
checking whether the folder exists. When a batch is necessary, the
necessary functions will be invoked.

---
Conflict resolution: Because of the removal of go-git in (#4941)
`_nogogit.go` files were either renamed or merged into the 'common'
file. Git does handle the renames correctly, but for those that were
merged has to be manually copied pasted over. The patch looks the same,
201 additions 90 deletions as the original patch.

(cherry picked from commit c03baab678ba5b2e9d974aea147e660417f5d3f7)
2024-08-26 03:48:51 +02:00
..
code [PORT] Refactor the usage of batch catfile (gitea#31754) 2024-08-26 03:48:51 +02:00
internal fix: breaking changes with meili (#5073) 2024-08-22 19:38:00 +00:00
issues fix: breaking changes with meili (#5073) 2024-08-22 19:38:00 +00:00
stats Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00