Skip to content

Commit 958b2eb

Browse files
peffgitster
authored andcommitted
move "%G" format test from t7510 to t6006
The final test in t7510 checks that "--format" placeholders that look similar to GPG placeholders (but that we don't actually understand) are passed through. That test was placed in t7510, since the other GPG placeholder tests are there. However, it does not have a GPG prerequisite, because it is not actually checking any signed commits. This causes the test to erroneously fail when gpg is not installed on a system, however. Not because we need signed commits, but because we need _any_ commit to run "git log". If we don't have gpg installed, t7510 doesn't create any commits at all. We can fix this by moving the test into t6006. This is arguably a better place anyway, because it is where we test most of the other placeholders (we do not test GPG placeholders there because of the infrastructure needed to make signed commits). Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aa4b78d commit 958b2eb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

t/t6006-rev-list-format.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,4 +394,10 @@ test_expect_success 'single-character name is parsed correctly' '
394394
test_cmp expect actual
395395
'
396396

397+
test_expect_success 'unused %G placeholders are passed through' '
398+
echo "%GX %G" >expect &&
399+
git log -1 --format="%GX %G" >actual &&
400+
test_cmp expect actual
401+
'
402+
397403
test_done

t/t7510-signed-commit.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,4 @@ test_expect_success GPG 'show lack of signature with custom format' '
147147
test_cmp expect actual
148148
'
149149

150-
test_expect_success 'unused %G placeholders are passed through' '
151-
echo "%GX %G" >expect &&
152-
git log -1 --format="%GX %G" >actual &&
153-
test_cmp expect actual
154-
'
155-
156150
test_done

0 commit comments

Comments
 (0)