diff --git a/pagure/lib/git.py b/pagure/lib/git.py index 017c31a..fdf37df 100644 --- a/pagure/lib/git.py +++ b/pagure/lib/git.py @@ -863,16 +863,15 @@ def merge_pull_request( # Get the fork repopath = pagure.get_remote_repo_path( request.remote_git, request.branch_from) - # Get the original repo - parentpath = pagure.get_repo_path(request.project) else: # Get the fork repopath = pagure.get_repo_path(request.project_from) - # Get the original repo - parentpath = _get_parent_repo_path(repo_from) fork_obj = PagureRepo(repopath) + # Get the original repo + parentpath = pagure.get_repo_path(request.project) + # Clone the original repo into a temp folder newpath = tempfile.mkdtemp(prefix='pagure-pr-merge') new_repo = pygit2.clone_repository(parentpath, newpath)