aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/commit.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-02-21 14:16:25 +0800
committerGitHub <noreply@github.com>2023-02-21 14:16:25 +0800
commitc50d4202ef23b59d25e259f0ec6e18a5e94c1b18 (patch)
treef7d7196e53b3e9d78f2290de47ea4860b70fa8e5 /modules/git/commit.go
parent660a83bd2ec1be02ca6eea7a84346f6cd1a31fce (diff)
downloadgitea-c50d4202ef23b59d25e259f0ec6e18a5e94c1b18.tar.gz
gitea-c50d4202ef23b59d25e259f0ec6e18a5e94c1b18.zip
Use `--message=%s` for git commit message (#23028) (#23029)
Backport #23028 This backport is done by manually because the git module is different.
Diffstat (limited to 'modules/git/commit.go')
-rw-r--r--modules/git/commit.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/commit.go b/modules/git/commit.go
index 061adc1082..ec2cc8ad81 100644
--- a/modules/git/commit.go
+++ b/modules/git/commit.go
@@ -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.