MCPcopy Index your code
hub / github.com/gitless-vcs/gitless / revparse_single

Method revparse_single

gitless/core.py:133–143  ·  view source on GitHub ↗
(self, revision)

Source from the content-addressed store, hash-verified

131 return '' if ret == '.' else ret
132
133 def revparse_single(self, revision):
134 if '/' in revision: # might be a remote branch
135 remote, remote_branch = revision.split('/', 1)
136 try:
137 return self.remotes[remote].lookup_branch(remote_branch).head
138 except KeyError:
139 pass
140 try:
141 return self.git_repo.revparse_single(revision)
142 except (KeyError, ValueError):
143 raise ValueError('No commit found for {0}'.format(revision))
144
145 def merge_base(self, b1, b2):
146 try:

Callers 11

_do_createFunction · 0.80
_do_set_headFunction · 0.80
_do_createFunction · 0.80
__call__Method · 0.80
mainFunction · 0.80
mainFunction · 0.80
setUpMethod · 0.80

Calls 1

lookup_branchMethod · 0.45

Tested by 5

setUpMethod · 0.64