Check if path is inside a git repository. Searches parent directories if .git is not directly at repo_path, supporting monorepo subdirectories. Args: repo_path: Path to check Returns: True if inside a git repository, False otherwise
(repo_path: Path)
| 134 | def is_git_repository(repo_path: Path) -> bool: |
| 135 | """ |
| 136 | Check if path is inside a git repository. |
| 137 | |
| 138 | Searches parent directories if .git is not directly at repo_path, |
| 139 | supporting monorepo subdirectories. |
| 140 | |
| 141 | Args: |
| 142 | repo_path: Path to check |
| 143 | |
| 144 | Returns: |
| 145 | True if inside a git repository, False otherwise |
| 146 | """ |
| 147 | return _get_git_repo(repo_path) is not None |
| 148 | |
| 149 | |
| 150 | def get_git_commit_hash(repo_path: Path) -> str: |
| 151 | """ |
| 152 | Get current git commit hash. |
no test coverage detected