mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 10:56:10 +01:00 
			
		
		
		
	fix #2002
This commit is contained in:
		| @@ -192,12 +192,18 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error | ||||
| 		return fmt.Errorf("git fetch [%s -> %s]: %s", headRepoPath, tmpBasePath, stderr) | ||||
| 	} | ||||
|  | ||||
| 	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) | ||||
| 	} | ||||
|  | ||||
| 	sig := doer.NewGitSig() | ||||
| 	if _, stderr, err = process.ExecDir(-1, tmpBasePath, | ||||
| 		fmt.Sprintf("PullRequest.Merge (git merge): %s", tmpBasePath), | ||||
| 		"git", "merge", "--no-ff", "-m", | ||||
| 		fmt.Sprintf("Merge branch '%s' of %s/%s into %s", pr.HeadBranch, pr.HeadUserName, pr.HeadRepo.Name, pr.BaseBranch), | ||||
| 		"head_repo/"+pr.HeadBranch); err != nil { | ||||
| 		return fmt.Errorf("git merge[%s]: %s", tmpBasePath, stderr) | ||||
| 		"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) | ||||
| 	} | ||||
|  | ||||
| 	// Push back to upstream. | ||||
|   | ||||
| @@ -180,7 +180,7 @@ func DeleteReleaseByID(id int64) error { | ||||
| 		return fmt.Errorf("RepoPath: %v", err) | ||||
| 	} | ||||
|  | ||||
| 	_, stderr, err := process.ExecDir(-1, repoPath, fmt.Sprintf("Delete release [%d]", rel.ID), | ||||
| 	_, stderr, err := process.ExecDir(-1, repoPath, fmt.Sprintf("DeleteReleaseByID (git tag -d): %d", rel.ID), | ||||
| 		"git", "tag", "-d", rel.TagName) | ||||
| 	if err != nil && !strings.Contains(stderr, "not found") { | ||||
| 		return fmt.Errorf("git tag -d: %v - %s", err, stderr) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user