From bcf6ec471eae48ac0a8298a908a841ae8f352865 Mon Sep 17 00:00:00 2001 From: Thorsten Klein Date: Fri, 23 Oct 2026 18:58:14 +0200 Subject: [PATCH] test: the fake gpg works with older git too git 2.34 only finds [GNUPG:] SIG_CREATED after a newline in the status output of gpg.program. The fake gpg printed it as the first line, so test_gpg_sign_signs_the_commit_and_the_nested_commits failed with "gpg failed to sign the data". Like gpg, it now prints BEGIN_SIGNING first. Co-Authored-By: Claude Opus 5.5 (1M context) --- tests/e2e/test_signing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/e2e/test_signing.py b/tests/e2e/test_signing.py index 1fddc90..1ffc0ce 100644 --- a/tests/e2e/test_signing.py +++ b/tests/e2e/test_signing.py @@ -5,9 +5,12 @@ import pytest from conftest import cmd_git_nested -# git asks gpg.program for a signature; this one makes a fake one. +# git asks gpg.program for a signature; this one makes a fake one. Like gpg, it +# prints another status line before SIG_CREATED: older git (e.g. 2.34) only finds +# SIG_CREATED after a newline. FAKE_GPG = """#!/bin/sh cat > /dev/null +echo '[GNUPG:] BEGIN_SIGNING H8' >&2 echo '[GNUPG:] SIG_CREATED D 1 8 00 0 FAKE' >&2 printf -- '-----BEGIN PGP SIGNATURE-----\\nfake\\n-----END PGP SIGNATURE-----\\n' """