(self, branch_name)
| 490 | yield regex.match(head).group(1) |
| 491 | |
| 492 | def lookup_branch(self, branch_name): |
| 493 | if not stdout(git('ls-remote', '--heads', self.name, branch_name)): |
| 494 | return None |
| 495 | # The branch exists in the remote |
| 496 | git.fetch(self.git_remote.name, branch_name) |
| 497 | git_branch = self.gl_repo.git_repo.lookup_branch( |
| 498 | self.git_remote.name + '/' + branch_name, pygit2.GIT_BRANCH_REMOTE) |
| 499 | return RemoteBranch(git_branch, self.gl_repo) |
| 500 | |
| 501 | |
| 502 | # Tag-related methods |