()
| 1141 | ) |
| 1142 | if fetch.returncode != 0: |
| 1143 | raise RuntimeError(f"git fetch failed for origin/{branch}") |
| 1144 | reset = subprocess.run( |
| 1145 | [shutil.which("git") or "git", "reset", "--hard", f"origin/{branch}"], |
| 1146 | cwd=existing_path, check=False, |
| 1147 | ) |
| 1148 | if reset.returncode != 0: |
| 1149 | raise RuntimeError(f"git reset failed for origin/{branch}") |
| 1150 | subprocess.run( |
| 1151 | [shutil.which("git") or "git", "clean", "-f", "--", "*.py", "*.css", "*.sh", "*.bash"], |
no test coverage detected