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

Method __init__

gitless/core.py:115–126  ·  view source on GitHub ↗

Create a Repository out of the current working repository.

(self)

Source from the content-addressed store, hash-verified

113 """
114
115 def __init__(self):
116 """Create a Repository out of the current working repository."""
117 try:
118 path = error_on_none(pygit2.discover_repository(os.getcwd()))
119 except KeyError:
120 raise NotInRepoError('You are not in a Gitless\'s repository')
121
122 self.git_repo = pygit2.Repository(path)
123 self.remotes = RemoteCollection(self.git_repo.remotes, self)
124 self.path = self.git_repo.path
125 self.root = self.path[:-6] # strip trailing /.git/
126 self.config = self.git_repo.config
127
128 @property
129 def cwd(self):

Callers

nothing calls this directly

Calls 3

error_on_noneFunction · 0.85
NotInRepoErrorClass · 0.85
RemoteCollectionClass · 0.85

Tested by

no test coverage detected