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

@ -139,6 +139,24 @@ def test_get_changed_files(in_git_dir):
assert files == []
def test_get_changed_files_disparate_histories(in_git_dir):
"""in modern versions of git, `...` does not fall back to full diff"""
git_commit()
in_git_dir.join('a.txt').ensure()
cmd_output('git', 'add', '.')
git_commit()
cmd_output('git', 'branch', '-m', 'branch1')
cmd_output('git', 'checkout', '--orphan', 'branch2')
cmd_output('git', 'rm', '-rf', '.')
in_git_dir.join('a.txt').ensure()
in_git_dir.join('b.txt').ensure()
cmd_output('git', 'add', '.')
git_commit()
assert git.get_changed_files('branch1', 'branch2') == ['b.txt']
@pytest.mark.parametrize(
('s', 'expected'),
(