Docs: clarify that the delete source branch default follows the merge request's source project
What does this MR do?
Documents that the Enable "Delete source branch" option by default project setting is read from the merge request's source project. For merge requests from forks, the pre-selected state of the checkbox comes from the fork's setting; the setting on the project the merge request targets has no effect, and forks do not inherit the value when they are created.
Project maintainers who disable the setting on an upstream project reasonably expect fork merge requests to stop pre-checking the box. Neither page currently explains why that does not happen.
Behavior: MergeRequests::BuildService#force_remove_source_branch reads merge_request.source_project.remove_source_branch_after_merge? (build_service.rb), and Projects::ForkService does not copy remove_source_branch_after_merge into new forks (fork_service.rb). I verified the behavior on GitLab.com in July 2026 with a fork whose upstream had the setting disabled.
Related issues
- #587483 (closed) (closed, fixed in 18.10): API-created merge requests ignored the setting.
- #215845 (closed) (closed, 13.11): earlier default-behavior fix.
- #521993 (open): fork source branches not deletable by non-members after merge.
The recurring reports suggest the source-project scoping surprises users; a docs note is the smallest fix for that.
Author's checklist
- Followed the documentation guidelines and style guidelines.
- Documented the behavior as verified, with the responsible code paths linked above.