(self, root_dir: Path)
| 6 | |
| 7 | class Git: |
| 8 | def __init__(self, root_dir: Path): |
| 9 | self.branch = "autofuzz_base" |
| 10 | self.root_dir = root_dir.resolve() |
| 11 | |
| 12 | self.config("user.name", "autofuzz") |
| 13 | self.config("user.email", "autofuzz@autofuzz.com") |
| 14 | self.checkout(self.branch) |
| 15 | |
| 16 | adds, mods = self.diff() |
| 17 | if adds or mods: |
| 18 | raise RuntimeError("Modified files found [" + self.branch + "]") |
| 19 | |
| 20 | def checkout(self, branch: str, create: bool = False): |
| 21 | cmd = ["git", "checkout", branch] |