mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-28 12:25:16 +00:00
![]() - Split `GetDiff` into two functions, `GetDiffSimple` and `GetDiffFull`. The former will do the bare minimum and really only get a Git diff while the latter does some extra stuff that's relevant for the frontend to show extra relevant. - Use `GetDiffSimple` for API related calls, as they do not benefit nor are returning the extra information that `GetDiffFull` provides, this should show a measurable performance increase for API calls that returns commits and `/repos/{owner}/{repo}/pulls/{index}/files`. - `GetDiffSimple` contains extra code comments about its interesting way to determine the before commit. - Add unit tests to demonstrates that the logic for determining the before commit didn't change and the function still yields correct information. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7682 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz> |
||
---|---|---|
.. | ||
activity.go | ||
attachment.go | ||
convert.go | ||
git_commit.go | ||
git_commit_test.go | ||
issue.go | ||
issue_comment.go | ||
issue_test.go | ||
main_test.go | ||
mirror.go | ||
notification.go | ||
package.go | ||
pull.go | ||
pull_review.go | ||
pull_test.go | ||
quota.go | ||
release.go | ||
release_test.go | ||
repository.go | ||
status.go | ||
user.go | ||
user_test.go | ||
utils.go | ||
utils_test.go | ||
wiki.go |