Helper function to get the files modified and staged.
(cwd: Optional[Path] = None)
| 396 | |
| 397 | |
| 398 | def get_diff_files(cwd: Optional[Path] = None) -> List[str]: |
| 399 | """ |
| 400 | Helper function to get the files modified and staged. |
| 401 | """ |
| 402 | output = git(["diff", "--name-only", "--staged", "-z"], cwd=cwd) |
| 403 | return output.split("\0")[:-1] # remove the trailing \0 |