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

Method create_branch

gitless/core.py:223–232  ·  view source on GitHub ↗
(self, name, head)

Source from the content-addressed store, hash-verified

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(

Callers 1

init_repositoryFunction · 0.95

Calls 2

BranchClass · 0.85
create_branchMethod · 0.45

Tested by

no test coverage detected