summaryrefslogtreecommitdiffstats
path: root/models/pull.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-20 04:08:08 -0500
committerUnknwon <u@gogs.io>2015-11-20 04:08:08 -0500
commit74dfe439c23420f22d1c893733bbde48d6aad4ca (patch)
tree8c31a4c831ad72beca67464801bea7f48e8d83d0 /models/pull.go
parent1d4a5b1825e46b51a1cbd6dc5d24a4ea585a0e72 (diff)
downloadgitea-74dfe439c23420f22d1c893733bbde48d6aad4ca.tar.gz
gitea-74dfe439c23420f22d1c893733bbde48d6aad4ca.zip
more fix on #2002
Diffstat (limited to 'models/pull.go')
-rw-r--r--models/pull.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/pull.go b/models/pull.go
index e67d242e90..587a959d65 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -194,8 +194,8 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
if _, stderr, err = process.ExecDir(-1, tmpBasePath,
fmt.Sprintf("PullRequest.Merge (git merge --no-commit): %s", tmpBasePath),
- "git", "merge", "--no-commit", "head_repo/"+pr.HeadBranch); err != nil {
- return fmt.Errorf("git merge --no-commit [%s]: %s", tmpBasePath, stderr)
+ "git", "merge", "--no-ff", "--no-commit", "head_repo/"+pr.HeadBranch); err != nil {
+ return fmt.Errorf("git merge --no-ff --no-commit [%s]: %s", tmpBasePath, stderr)
}
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),
"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 {
- return fmt.Errorf("git commit [%s]: %s", tmpBasePath, stderr)
+ return fmt.Errorf("git commit [%s]: %v - %s", tmpBasePath, err, stderr)
}
// Push back to upstream.