mirror of
https://github.com/go-gitea/gitea
synced 2025-12-06 21:08:25 +00:00
Allow empty commit when merging pull request with squash style (#35989)
Before this PR, when merging an empty PR with squash style will result in 500. --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Zettat123 <zettat123@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -71,7 +71,8 @@ func doMergeStyleSquash(ctx *mergeContext, message string) error {
|
||||
}
|
||||
cmdCommit := gitcmd.NewCommand("commit").
|
||||
AddOptionFormat("--author='%s <%s>'", sig.Name, sig.Email).
|
||||
AddOptionFormat("--message=%s", message)
|
||||
AddOptionFormat("--message=%s", message).
|
||||
AddArguments("--allow-empty")
|
||||
if ctx.signKey == nil {
|
||||
cmdCommit.AddArguments("--no-gpg-sign")
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user