diff options
Diffstat (limited to 'src/git/__init__.py')
-rw-r--r-- | src/git/__init__.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/git/__init__.py b/src/git/__init__.py deleted file mode 100644 index 319fea2..0000000 --- a/src/git/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -from subprocess import CalledProcessError, check_output - - -def root() -> str: - try: - root = check_output(["git", "rev-parse", "--show-toplevel"]).decode("utf-8").strip() - return root - except CalledProcessError as err: - raise OSError("Current working directory is not a git repository") from err - - -def repository_name() -> str: - repo_path = root() - return repo_path.split("/")[-1] |