Skip to content

Commit

Permalink
move "%G" format test from t7510 to t6006
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Jun 25, 2014
1 parent aa4b78d commit 958b2eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions t/t6006-rev-list-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -394,4 +394,10 @@ test_expect_success 'single-character name is parsed correctly' '
test_cmp expect actual
'

test_expect_success 'unused %G placeholders are passed through' '
echo "%GX %G" >expect &&
git log -1 --format="%GX %G" >actual &&
test_cmp expect actual
'

test_done
6 changes: 0 additions & 6 deletions t/t7510-signed-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,4 @@ test_expect_success GPG 'show lack of signature with custom format' '
test_cmp expect actual
'

test_expect_success 'unused %G placeholders are passed through' '
echo "%GX %G" >expect &&
git log -1 --format="%GX %G" >actual &&
test_cmp expect actual
'

test_done

0 comments on commit 958b2eb

Please sign in to comment.