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

Function check_git_dir

ggshield/utils/git_shell.py:185–190  ·  view source on GitHub ↗

Check if folder is git directory.

(wd: Optional[Union[str, Path]] = None)

Source from the content-addressed store, hash-verified

183
184
185def check_git_dir(wd: Optional[Union[str, Path]] = None) -> None:
186 """Check if folder is git directory."""
187 if wd is None:
188 wd = Path.cwd()
189 if not is_git_dir(wd):
190 raise NotAGitDirectory()
191
192
193def git(

Callers 9

install_localFunction · 0.90
precommit_cmdFunction · 0.90
changes_cmdFunction · 0.90
prepush_cmdFunction · 0.90
ci_cmdFunction · 0.90
test_check_git_dirFunction · 0.90
get_git_rootFunction · 0.85
check_git_refFunction · 0.85

Calls 2

is_git_dirFunction · 0.85
NotAGitDirectoryClass · 0.85

Tested by 1

test_check_git_dirFunction · 0.72