1
0
Fork 0
forked from forgejo/forgejo

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:
Chris Copeland 2024-02-12 14:37:23 -08:00 committed by Gergely Nagy
parent 05eaf1cf3e
commit 83123b493f
No known key found for this signature in database
25 changed files with 204 additions and 11 deletions

View file

@ -19930,6 +19930,11 @@
"description": "EditRepoOption options when editing a repository's properties",
"type": "object",
"properties": {
"allow_fast_forward_only_merge": {
"description": "either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging.",
"type": "boolean",
"x-go-name": "AllowFastForwardOnly"
},
"allow_manual_merge": {
"description": "either `true` to allow mark pr as merged manually, or `false` to prevent it.",
"type": "boolean",
@ -19986,7 +19991,7 @@
"x-go-name": "DefaultDeleteBranchAfterMerge"
},
"default_merge_style": {
"description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", or \"squash\".",
"description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", or \"fast-forward-only\".",
"type": "string",
"x-go-name": "DefaultMergeStyle"
},
@ -21395,6 +21400,7 @@
"rebase",
"rebase-merge",
"squash",
"fast-forward-only",
"manually-merged"
]
},
@ -22795,6 +22801,10 @@
"description": "Repository represents a repository",
"type": "object",
"properties": {
"allow_fast_forward_only_merge": {
"type": "boolean",
"x-go-name": "AllowFastForwardOnly"
},
"allow_merge_commits": {
"type": "boolean",
"x-go-name": "AllowMerge"