MCPcopy
hub / github.com/GitGuardian/ggshield / is_git_dir

Function is_git_dir

ggshield/utils/git_shell.py:154–155  ·  view source on GitHub ↗
(wd: Union[str, Path])

Source from the content-addressed store, hash-verified

152
153
154def is_git_dir(wd: Union[str, Path]) -> bool:
155 return _git_rev_parse("--git-dir", Path(wd)) is not None
156
157
158def is_git_working_tree(wd: Union[str, Path]) -> bool:

Callers 8

list_filesFunction · 0.90
_find_dot_envFunction · 0.90
scan_repo_pathFunction · 0.90
test_is_git_dirFunction · 0.90
check_git_dirFunction · 0.85
is_gitignoredFunction · 0.85
gitignoreFunction · 0.85

Calls 1

_git_rev_parseFunction · 0.85

Tested by 1

test_is_git_dirFunction · 0.72