mirror of
https://github.com/git/git.git
synced 2024-11-27 12:03:55 +08:00
ssh signing: make sign/amend test more resilient
The test `amending already signed commit` is using git checkout to select a specific commit to amend. In case an earlier test fails and leaves behind a dirty index/worktree this test would fail as well. Using `checkout -f` will avoid interference by most other tests. Signed-off-by: Fabian Stelzer <fs@gigacodes.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
350a2518c8
commit
3b4b5a793a
@ -228,7 +228,7 @@ test_expect_success GPG 'detect fudged signature with NUL' '
|
||||
'
|
||||
|
||||
test_expect_success GPG 'amending already signed commit' '
|
||||
git checkout fourth-signed^0 &&
|
||||
git checkout -f fourth-signed^0 &&
|
||||
git commit --amend -S --no-edit &&
|
||||
git verify-commit HEAD &&
|
||||
git show -s --show-signature HEAD >actual &&
|
||||
|
@ -239,7 +239,7 @@ test_expect_success GPGSSH 'amending already signed commit' '
|
||||
test_config gpg.format ssh &&
|
||||
test_config user.signingkey "${GPGSSH_KEY_PRIMARY}" &&
|
||||
test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
|
||||
git checkout fourth-signed^0 &&
|
||||
git checkout -f fourth-signed^0 &&
|
||||
git commit --amend -S --no-edit &&
|
||||
git verify-commit HEAD &&
|
||||
git show -s --show-signature HEAD >actual &&
|
||||
|
Loading…
Reference in New Issue
Block a user