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

@ -817,6 +817,35 @@ def test_post_merge_integration(tempdir_factory, store):
assert os.path.exists('post-merge.tmp')
def test_post_rewrite_integration(tempdir_factory, store):
path = git_dir(tempdir_factory)
config = [
{
'repo': 'local',
'hooks': [{
'id': 'post-rewrite',
'name': 'Post rewrite',
'entry': 'touch post-rewrite.tmp',
'language': 'system',
'always_run': True,
'verbose': True,
'stages': ['post-rewrite'],
}],
},
]
write_config(path, config)
with cwd(path):
open('init', 'a').close()
cmd_output('git', 'add', '.')
install(C.CONFIG_FILE, store, hook_types=['post-rewrite'])
git_commit()
assert not os.path.exists('post-rewrite.tmp')
git_commit('--amend', '-m', 'ammended message')
assert os.path.exists('post-rewrite.tmp')
def test_post_checkout_integration(tempdir_factory, store):
path = git_dir(tempdir_factory)
config = [
@ -948,7 +977,7 @@ def test_pre_merge_commit_integration(tempdir_factory, store):
output_pattern = re_assert.Matches(
r'^\[INFO\] Initializing environment for .+\n'
r'Bash hook\.+Passed\n'
r"Merge made by the 'recursive' strategy.\n"
r"Merge made by the '(ort|recursive)' strategy.\n"
r' foo \| 0\n'
r' 1 file changed, 0 insertions\(\+\), 0 deletions\(-\)\n'
r' create mode 100644 foo\n$',