]> source.dussan.org Git - gitea.git/commitdiff
more fix on #2002
authorUnknwon <u@gogs.io>
Fri, 20 Nov 2015 09:08:08 +0000 (04:08 -0500)
committerUnknwon <u@gogs.io>
Fri, 20 Nov 2015 09:08:08 +0000 (04:08 -0500)
models/pull.go

index e67d242e906575dd168abdb0846aceba30515ff3..587a959d6556b2023f745ac9b200cbecaf1a111d 100644 (file)
@@ -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.