Run a git command.
(self, args: List[str], check: bool = True)
| 130 | sys.exit(1) |
| 131 | |
| 132 | def run_git(self, args: List[str], check: bool = True) -> subprocess.CompletedProcess: |
| 133 | """Run a git command.""" |
| 134 | return subprocess.run( |
| 135 | ["git"] + args, |
| 136 | cwd=self.git_root, |
| 137 | capture_output=True, |
| 138 | text=True, |
| 139 | check=check |
| 140 | ) |
| 141 | |
| 142 | def validate_git_status(self) -> bool: |
| 143 | """Verify that git status is clean with no uncommitted changes.""" |
no test coverage detected