1
0
Fork 0
forked from forgejo/forgejo

Use --message=%s for git commit message (#23028) (#23029)

Backport #23028

This backport is done by manually because the git module is different.
This commit is contained in:
wxiaoguang 2023-02-21 14:16:25 +08:00 committed by GitHub
parent 660a83bd2e
commit c50d4202ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -132,7 +132,7 @@ func CommitChangesWithArgs(repoPath string, args []CmdArg, opts CommitChangesOpt
if opts.Author != nil {
cmd.AddArguments(CmdArg(fmt.Sprintf("--author='%s <%s>'", opts.Author.Name, opts.Author.Email)))
}
cmd.AddArguments("-m").AddDynamicArguments(opts.Message)
cmd.AddArguments(CmdArg("--message=" + opts.Message))
_, _, err := cmd.RunStdString(&RunOpts{Dir: repoPath})
// No stderr but exit status 1 means nothing to commit.