Check if folder is git directory.
(wd: Optional[Union[str, Path]] = None)
| 183 | |
| 184 | |
| 185 | def 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 | |
| 193 | def git( |