1
0
Fork 0

Merging upstream version 2.15.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 21:30:55 +01:00
parent 0c58496b9d
commit bb75b7dc3e
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
38 changed files with 396 additions and 59 deletions

View file

@ -155,12 +155,15 @@ def get_all_files() -> List[str]:
def get_changed_files(old: str, new: str) -> List[str]:
return zsplit(
cmd_output(
'git', 'diff', '--name-only', '--no-ext-diff', '-z',
f'{old}...{new}',
)[1],
)
diff_cmd = ('git', 'diff', '--name-only', '--no-ext-diff', '-z')
try:
_, out, _ = cmd_output(*diff_cmd, f'{old}...{new}')
except CalledProcessError: # pragma: no cover (new git)
# on newer git where old and new do not have a merge base git fails
# so we try a full diff (this is what old git did for us!)
_, out, _ = cmd_output(*diff_cmd, f'{old}..{new}')
return zsplit(out)
def head_rev(remote: str) -> str: