forgejo/services/pull
Brecht Van Lommel 33f9fb8150
Fix slow patch checking with commits that add or remove many files ()
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 , 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
..
check.go fix(hook): repo admins are wrongly denied the right to force merge 2024-06-02 21:16:46 +02:00
check_test.go
comment.go
commit_status.go
commit_status_test.go
edits.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
lfs.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods () 2023-12-07 15:27:36 +08:00
main_test.go
merge.go Enable unparam linter () 2024-06-16 13:42:58 +02:00
merge_ff_only.go
merge_merge.go
merge_prepare.go
merge_rebase.go
merge_squash.go
merge_test.go
patch.go Fix slow patch checking with commits that add or remove many files () 2024-07-07 07:33:01 +02:00
patch_unmerged.go
pull.go Add codespell support and fix a good number of typos with its help () 2024-05-09 13:49:37 +00:00
pull_test.go
review.go Resolve lint for unused parameter and unnecessary type arguments () 2024-05-05 08:38:16 +01:00
review_test.go
temp_repo.go
update.go
update_rebase.go