1
0
Fork 0

Adding 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:35 +01:00
parent dcfd04081c
commit d3b459fcc0
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
38 changed files with 396 additions and 59 deletions

View file

@ -99,6 +99,7 @@ def test_run_legacy_recursive(tmpdir):
('post-commit', []),
('post-merge', ['1']),
('post-checkout', ['old_head', 'new_head', '1']),
('post-rewrite', ['amend']),
# multiple choices for commit-editmsg
('prepare-commit-msg', ['.git/COMMIT_EDITMSG']),
('prepare-commit-msg', ['.git/COMMIT_EDITMSG', 'message']),
@ -166,6 +167,14 @@ def test_run_ns_post_merge():
assert ns.is_squash_merge == '1'
def test_run_ns_post_rewrite():
ns = hook_impl._run_ns('post-rewrite', True, ('amend',), b'')
assert ns is not None
assert ns.hook_stage == 'post-rewrite'
assert ns.color is True
assert ns.rewrite_command == 'amend'
def test_run_ns_post_checkout():
ns = hook_impl._run_ns('post-checkout', True, ('a', 'b', 'c'), b'')
assert ns is not None