Prevent squashing commits from protected branches
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=24452)
</details>
<!--IssueSummary end-->
As part of a project with build promoted, we want to allow a merge of `develop` to `master` without squashing commits, so that the history git is identical between `develop` and `master`. However, we also want to allow squash commits between feature branches and `develop`.
### Proposal
Add a new setting in the Merge Request settings to `prevent squashing commits from protected branches`. This would disable squash commits for all MRs where the source branch is protected.
This should also hide the `squash?` checkbox in MRs and if https://gitlab.com/gitlab-org/gitlab/-/issues/498698+ has been implemented, it should also prevent you from creating any overrides where the source branch is a protected branch.
Solution is part of https://gitlab.com/gitlab-org/gitlab/-/issues/290042+. Discussion about flexibility of proposed solution https://gitlab.com/gitlab-org/gitlab/-/issues/290042#note_1838149523.

issue