forgejo/services
Brecht Van Lommel 33f9fb8150
Fix slow patch checking with commits that add or remove many files (#31548)
Running git update-index for every individual file is slow, so add and
remove everything with a single git command.

When such a big commit lands in the default branch, it could cause PR
creation and patch checking for all open PRs to be slow, or time out
entirely. For example, a commit that removes 1383 files was measured to
take more than 60 seconds and timed out. With this change checking took
about a second.

This is related to #27967, though this will not help with commits that
change many lines in few files.

(cherry picked from commit b88e5fc72d99e9d4a0aa9c13f70e0a9e967fe057)
2024-07-07 07:33:01 +02:00
..
actions Fixes git references wrongly transmitted to the action run 2024-06-30 06:17:40 +02:00
agit fix(hook): ignore unknown push options instead of failing 2024-07-02 21:39:01 +02:00
asymkey
attachment
auth
automerge
context
contexttest
convert
cron
doctor
externalaccount
f3
federation
feed
forgejo
forms
gitdiff
indexer
issue
lfs
mailer
markup
migrations
mirror
notify
org
packages
pull Fix slow patch checking with commits that add or remove many files (#31548) 2024-07-07 07:33:01 +02:00
release
remote
repository [ENHANCEMENT] Improve caching of contributor stats 2024-07-06 21:23:46 +02:00
secrets
task
uinotification
user
webhook
wiki