(old: str, new: str)
| 156 | |
| 157 | |
| 158 | def get_changed_files(old: str, new: str) -> list[str]: |
| 159 | diff_cmd = ('git', 'diff', '--name-only', '--no-ext-diff', '-z') |
| 160 | try: |
| 161 | _, out, _ = cmd_output(*diff_cmd, f'{old}...{new}') |
| 162 | except CalledProcessError: # pragma: no cover (new git) |
| 163 | # on newer git where old and new do not have a merge base git fails |
| 164 | # so we try a full diff (this is what old git did for us!) |
| 165 | _, out, _ = cmd_output(*diff_cmd, f'{old}..{new}') |
| 166 | |
| 167 | return zsplit(out) |
| 168 | |
| 169 | |
| 170 | def head_rev(remote: str) -> str: |
nothing calls this directly
no test coverage detected