From eb932a57b101abbadc4bd2433d8ae4037e1357c9 Mon Sep 17 00:00:00 2001 From: Varun Sairam Date: Sun, 7 Apr 2024 14:53:23 -0700 Subject: [PATCH] Add git submodule suppot (to detect submodule repos) --- vcstool/clients/git.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcstool/clients/git.py b/vcstool/clients/git.py index ae1ae8bb..4ed9741b 100644 --- a/vcstool/clients/git.py +++ b/vcstool/clients/git.py @@ -28,7 +28,8 @@ def get_git_version(cls): @staticmethod def is_repository(path): - return os.path.isdir(os.path.join(path, '.git')) + 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)