MCPcopy
hub / github.com/gitless-vcs/gitless / lookup_branch

Method lookup_branch

gitless/core.py:492–499  ·  view source on GitHub ↗
(self, branch_name)

Source from the content-addressed store, hash-verified

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

Callers 15

create_branchMethod · 0.95
init_repositoryFunction · 0.45
revparse_singleMethod · 0.45
lookup_branchMethod · 0.45
_updateMethod · 0.45
_updateMethod · 0.45
_do_listFunction · 0.45
mainFunction · 0.45
test_createMethod · 0.45
test_deleteMethod · 0.45

Calls 2

RemoteBranchClass · 0.85
stdoutFunction · 0.70