1
1
mirror of https://github.com/go-gitea/gitea synced 2025-12-07 13:28:25 +00:00

Allow empty commit when merging pull request with squash style (#35989) (#36003)

This commit is contained in:
Lunny Xiao
2025-11-22 09:17:28 -08:00
committed by GitHub
parent 20cf4b7849
commit 91901c2a60
2 changed files with 32 additions and 1 deletions

View File

@@ -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 {