mirror of
https://github.com/go-gitea/gitea
synced 2025-08-16 06:28:27 +00:00
Backport #23028 This backport is done by manually because the git module is different.
This commit is contained in:
@@ -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.
|
||||
|
@@ -319,7 +319,7 @@ func initRepoCommit(ctx context.Context, tmpPath string, repo *repo_model.Reposi
|
||||
|
||||
cmd := git.NewCommand(ctx,
|
||||
"commit", git.CmdArg(fmt.Sprintf("--author='%s <%s>'", sig.Name, sig.Email)),
|
||||
"-m", "Initial commit",
|
||||
"--message=Initial commit",
|
||||
)
|
||||
|
||||
sign, keyID, signer, _ := asymkey_service.SignInitialCommit(ctx, tmpPath, u)
|
||||
|
Reference in New Issue
Block a user