Locates the repository's root path from a subdirectory.
(self, git_dir=None, **kwargs)
| 92 | return self.rev_parse("--abbrev-ref", "HEAD", **kwargs) |
| 93 | |
| 94 | def repository_root(self, git_dir=None, **kwargs): |
| 95 | """ Locates the repository's root path from a subdirectory. """ |
| 96 | stdout = self.rev_parse("--show-toplevel", git_dir=git_dir, **kwargs) |
| 97 | return stdout.decode('utf-8') |
| 98 | |
| 99 | |
| 100 | git = Git() |