mirror of
https://github.com/go-gitea/gitea
synced 2024-11-01 01:03:39 +01:00
more fix on #2002
This commit is contained in:
parent
1d4a5b1825
commit
74dfe439c2
@ -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 New Issue
Block a user