From 3428d014ae8f14133f44030e278d7ded1ebf7638 Mon Sep 17 00:00:00 2001 From: "r.jaepel" <r.jaepel@fz-juelich.de> Date: Mon, 7 Aug 2023 16:25:40 +0200 Subject: [PATCH] Fix GitRepo initialization --- .gitignore | 3 ++- git_lfs_utils/__init__.py | 2 +- git_lfs_utils/utils.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 723ef36..a47fb1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea \ No newline at end of file +.idea +__pycache__ \ No newline at end of file diff --git a/git_lfs_utils/__init__.py b/git_lfs_utils/__init__.py index eca5d41..2666ce3 100644 --- a/git_lfs_utils/__init__.py +++ b/git_lfs_utils/__init__.py @@ -1 +1 @@ -from utils import GitRepo \ No newline at end of file +from git_lfs_utils.git_lfs_utils.utils import GitRepo diff --git a/git_lfs_utils/utils.py b/git_lfs_utils/utils.py index 14e6163..0dabd02 100644 --- a/git_lfs_utils/utils.py +++ b/git_lfs_utils/utils.py @@ -11,7 +11,7 @@ def update_package_list(): class GitRepo(git.Repo): def __init__(self, repository_path=None, *args, **kwargs): - if repository_path is None: + if repository_path is None or repository_path == ".": starting_path = os.getcwd() path = starting_path else: -- GitLab