Skip to content

Commit

Permalink
Issue #541: Change branch switch logic in git machete checkout-prs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
amalota authored Jun 14, 2022
1 parent d4e4cce commit cfba31a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion git_machete/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,7 @@ def checkout_github_prs(self,

debug('Current GitHub user is ' + (current_user or '<none>'))
self.__sync_annotations_to_definition_file(all_open_prs, current_user, verbose=verbose)
if pr and len(checked_out_prs) == 1:
if len(applicable_prs) == 1:
self.__git.checkout(LocalBranchShortName.of(pr.head))
if verbose:
print(fmt(f"Switched to local branch `{pr.head}`"))
Expand Down
4 changes: 2 additions & 2 deletions tests/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,15 +1045,15 @@ def test_github_sync(self) -> None:

expected_status_output = (
"""
master *
master
|
o-bar (untracked)
|
o-foo
|
o-moo (untracked)
|
o-snickers PR #7
o-snickers * PR #7
"""
)
assert_command(['status'], expected_status_output)
Expand Down

0 comments on commit cfba31a

Please sign in to comment.