(self, name, head)
| 221 | return self.lookup_branch(b.shorthand) |
| 222 | |
| 223 | def create_branch(self, name, head): |
| 224 | try: |
| 225 | return Branch( |
| 226 | self.git_repo.create_branch(name, head, False), # force=False |
| 227 | self) |
| 228 | except ValueError as e: |
| 229 | # Edit pygit2's error msg (the message exposes Git details that will |
| 230 | # confuse the Gitless's user) |
| 231 | raise ValueError( |
| 232 | str(e).replace('refs/heads/', '').replace('reference', 'branch')) |
| 233 | |
| 234 | def lookup_branch(self, branch_name): |
| 235 | git_branch = self.git_repo.lookup_branch( |
no test coverage detected