1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00
forgejo/modules/indexer/code
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
..
bleve [PORT] Refactor the usage of batch catfile (gitea#31754) 2024-08-26 03:48:51 +02:00
elasticsearch [PORT] Refactor the usage of batch catfile (gitea#31754) 2024-08-26 03:48:51 +02:00
internal Refactor code_indexer to use an SearchOptions struct for PerformSearch (#29724) 2024-03-18 12:25:05 +00:00
git.go Add codespell support and fix a good number of typos with its help (#3270) 2024-05-09 13:49:37 +00:00
indexer.go s/Gitea/Forgejo in various log messages and comments 2024-04-21 21:26:15 +05:00
indexer_test.go Adjust codespell config + make it fix few typos which sneaked in since addition of codespell support (#4857) 2024-08-08 16:07:35 +00:00
search.go Adjust codespell config + make it fix few typos which sneaked in since addition of codespell support (#4857) 2024-08-08 16:07:35 +00:00