From 5b482b45b64ed917dc2a22aaa6bf6cc4e82a3253 Mon Sep 17 00:00:00 2001 From: Leander Stephen D'Souza Date: Mon, 25 Aug 2025 11:26:35 +0100 Subject: [PATCH] Added support for git submodules. --- vcs2l/clients/git.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)