mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 12:15:43 +01:00
more fix on #2002
This commit is contained in:
parent
1d4a5b1825
commit
74dfe439c2
1 changed files with 3 additions and 3 deletions
|
@ -194,8 +194,8 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
|
||||||
|
|
||||||
if _, stderr, err = process.ExecDir(-1, tmpBasePath,
|
if _, stderr, err = process.ExecDir(-1, tmpBasePath,
|
||||||
fmt.Sprintf("PullRequest.Merge (git merge --no-commit): %s", tmpBasePath),
|
fmt.Sprintf("PullRequest.Merge (git merge --no-commit): %s", tmpBasePath),
|
||||||
"git", "merge", "--no-commit", "head_repo/"+pr.HeadBranch); err != nil {
|
"git", "merge", "--no-ff", "--no-commit", "head_repo/"+pr.HeadBranch); err != nil {
|
||||||
return fmt.Errorf("git merge --no-commit [%s]: %s", tmpBasePath, stderr)
|
return fmt.Errorf("git merge --no-ff --no-commit [%s]: %s", tmpBasePath, stderr)
|
||||||
}
|
}
|
||||||
|
|
||||||
sig := doer.NewGitSig()
|
sig := doer.NewGitSig()
|
||||||
|
@ -203,7 +203,7 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
|
||||||
fmt.Sprintf("PullRequest.Merge (git merge): %s", tmpBasePath),
|
fmt.Sprintf("PullRequest.Merge (git merge): %s", tmpBasePath),
|
||||||
"git", "commit", fmt.Sprintf("--author='%s <%s>'", sig.Name, sig.Email),
|
"git", "commit", fmt.Sprintf("--author='%s <%s>'", sig.Name, sig.Email),
|
||||||
"-m", fmt.Sprintf("Merge branch '%s' of %s/%s into %s", pr.HeadBranch, pr.HeadUserName, pr.HeadRepo.Name, pr.BaseBranch)); err != nil {
|
"-m", fmt.Sprintf("Merge branch '%s' of %s/%s into %s", pr.HeadBranch, pr.HeadUserName, pr.HeadRepo.Name, pr.BaseBranch)); err != nil {
|
||||||
return fmt.Errorf("git commit [%s]: %s", tmpBasePath, stderr)
|
return fmt.Errorf("git commit [%s]: %v - %s", tmpBasePath, err, stderr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Push back to upstream.
|
// Push back to upstream.
|
||||||
|
|
Loading…
Reference in a new issue