(base: str, head: str)
| 105 | |
| 106 | |
| 107 | def changed_files(base: str, head: str) -> list[Path]: |
| 108 | if ZERO_SHA.fullmatch(base): |
| 109 | return all_article_files() |
| 110 | |
| 111 | diff_expr = f"{base}...{head}" |
| 112 | output = run_git(["diff", "--name-only", "--diff-filter=ACMRT", diff_expr], check=False) |
| 113 | if not output.strip(): |
| 114 | output = run_git(["diff", "--name-only", "--diff-filter=ACMRT", f"{base}..{head}"]) |
| 115 | return sorted(Path(line) for line in output.splitlines() if line.strip()) |
| 116 | |
| 117 | |
| 118 | def staged_files() -> list[Path]: |
no test coverage detected