@@ -219,7 +219,7 @@ def _ensure_git_repos(self, repo: str) -> list[str]:
219219 raise BadGitRepo (f'{ repo } is not a directory' )
220220
221221 # Check if repo is a git dir
222- if self . _is_git_dir (repo ):
222+ if is_git_dir (repo ):
223223 # print('Local Git repository:', repo)
224224 return [repo ]
225225
@@ -230,7 +230,7 @@ def _ensure_git_repos(self, repo: str) -> list[str]:
230230 git_repos = []
231231 print ('Directory containing multiple Git repositories' )
232232 for path in paths :
233- if self . _is_git_dir (path ):
233+ if is_git_dir (path ):
234234 print ('- Found Git repository:' , path )
235235 git_repos .append (path )
236236 else :
@@ -247,10 +247,6 @@ def _check_registered_metrics(self, metric_info: MetricInfo):
247247 if metric_info .version_chart_type not in ['donut' , 'pie' , 'bar' , 'hbar' ]:
248248 raise BadVersionChart (f'version chart in { metric_info .name } should be donut, pie, bar, or hbar, not { metric_info .version_chart_type } ' )
249249
250- def _is_git_dir (self , project_path ):
251- git_path = os .path .join (project_path , '.git' )
252- return is_git_dir (git_path )
253-
254250 def _is_git_remote (self , repo : str ) -> bool :
255251 return repo .startswith (("git@" , "https://" , "http://" , "git://" ))
256252
0 commit comments