Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

Commit 556ffdd

Browse files
authored
Merge pull request #76 from sileht/tracking-D
-D: Fix tracked upstream branch
2 parents 95fe9ea + 1dc7d40 commit 556ffdd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

git_pull_request/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,15 +355,12 @@ def download_pull_request(g, repo, target_remote, pull_number,
355355

356356
if setup_remote:
357357
remote_name = "github-%s" % pull.user.login
358-
remote_branch = pull.head.ref
359-
remote_to_push = remote_name + "/" + remote_branch
360358
remote = git_remote_url(remote_name, raise_on_error=False)
361359
if not remote:
362360
_run_shell_command(["git", "remote", "add", remote_name,
363361
pull.head.repo.clone_url])
364362
_run_shell_command(["git", "fetch", remote_name])
365-
_run_shell_command(["git", "branch", "-u", remote_to_push,
366-
local_branch_name])
363+
_run_shell_command(["git", "branch", "-u", "origin", pull.base.ref])
367364

368365

369366
def edit_file_get_content_and_remove(filename):

0 commit comments

Comments
 (0)