diff --git a/vcs2l/clients/git.py b/vcs2l/clients/git.py index 4f013a8..278ad43 100644 --- a/vcs2l/clients/git.py +++ b/vcs2l/clients/git.py @@ -25,7 +25,10 @@ def get_git_version(cls): @staticmethod def is_repository(path): - return os.path.isdir(os.path.join(path, '.git')) + """Check if the given path is a git repository or a submodule.""" + return os.path.isdir(os.path.join(path, '.git')) or os.path.isfile( + os.path.join(path, '.git') + ) def __init__(self, path): super(GitClient, self).__init__(path)