Create a Repository out of the current working repository.
(self)
| 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): |
nothing calls this directly
no test coverage detected