forgejo/services/pull
Gusted f3ccfc4969 fix: short-circuit to avoid rebasing (#8622)
- Do not try to rebase a pull request when it is zero commits behind. We can trust this number as before merging a repository the status of the pull request is mergeable and thus not in a conflict checking stage (where this would be updated).
- This resolves a issue where `git-replay` would rebase a pull request when this is not needed and causes to lose the signature of Git commits and commit IDs as shown in the pullrequest commits timeline.
- Resolves forgejo/forgejo#8619
- Add a simple integration test that simply checks that after merging a up-to-date pull request via the rebase style that the commit ID didn't change. This demonstrates that it didn't do needlessly rebasing.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8622
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-07-23 07:30:30 +02:00
..
check.go feat: introduce global merge message templates (#8347) 2025-07-12 16:00:42 +02:00
check_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
comment.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
commit_status.go chore: Refactor Is{Reference,Branch}Exist (#8425) 2025-07-06 07:16:43 +02:00
commit_status_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
edits.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
lfs.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
main_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
merge.go feat: introduce global merge message templates (#8347) 2025-07-12 16:00:42 +02:00
merge_ff_only.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
merge_merge.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
merge_prepare.go fix: short-circuit to avoid rebasing (#8622) 2025-07-23 07:30:30 +02:00
merge_rebase.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
merge_squash.go [gitea] Always use an empty line to separate the commit message and trailer (#8041) 2025-06-02 22:10:59 +02:00
merge_test.go feat: introduce global merge message templates (#8347) 2025-07-12 16:00:42 +02:00
patch.go feat: improve checking if diffs differ (#8451) 2025-07-16 18:19:27 +02:00
patch_test.go feat: improved performances when checking for conflicts on pull requests (#7727) 2025-05-16 12:40:38 +00:00
patch_unmerged.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
pull.go feat: improve checking if diffs differ (#8451) 2025-07-16 18:19:27 +02:00
pull_test.go feat: introduce global merge message templates (#8347) 2025-07-12 16:00:42 +02:00
review.go feat: improve checking if diffs differ (#8451) 2025-07-16 18:19:27 +02:00
review_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
temp_repo.go feat: bump the minimum required Git version from 2.0.0 to 2.34.1 (#8328) 2025-06-29 00:44:18 +02:00
update.go chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
update_rebase.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00