mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 00:45:22 +02:00
Add merge style fast-forward-only
(#28954)
With this option, it is possible to require a linear commit history with the following benefits over the next best option `Rebase+fast-forward`: The original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier. Closes #24906
This commit is contained in:
parent
05eaf1cf3e
commit
83123b493f
25 changed files with 204 additions and 11 deletions
|
@ -153,6 +153,7 @@ type PullRequestsConfig struct {
|
|||
AllowRebase bool
|
||||
AllowRebaseMerge bool
|
||||
AllowSquash bool
|
||||
AllowFastForwardOnly bool
|
||||
AllowManualMerge bool
|
||||
AutodetectManualMerge bool
|
||||
AllowRebaseUpdate bool
|
||||
|
@ -179,6 +180,7 @@ func (cfg *PullRequestsConfig) IsMergeStyleAllowed(mergeStyle MergeStyle) bool {
|
|||
mergeStyle == MergeStyleRebase && cfg.AllowRebase ||
|
||||
mergeStyle == MergeStyleRebaseMerge && cfg.AllowRebaseMerge ||
|
||||
mergeStyle == MergeStyleSquash && cfg.AllowSquash ||
|
||||
mergeStyle == MergeStyleFastForwardOnly && cfg.AllowFastForwardOnly ||
|
||||
mergeStyle == MergeStyleManuallyMerged && cfg.AllowManualMerge
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue