Skip to content

Commit

Permalink
t7510: stop referring to master in later tests
Browse files Browse the repository at this point in the history
Our setup creates a sequence of commits, each with its own
tag. However, we sometimes refer to "seventh-signed" as
"master". This works, since it is at the tip of the created
branch, but is brittle if new tests need to add more
commits. Let's use its tag name to be unambiguous.

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 17, 2014
1 parent 9a597ed commit 526d56e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/t7510-signed-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test_expect_success GPG 'create signed commits' '

test_expect_success GPG 'show signatures' '
(
for commit in initial second merge fourth-signed fifth-signed sixth-signed master
for commit in initial second merge fourth-signed fifth-signed sixth-signed seventh-signed
do
git show --pretty=short --show-signature $commit >actual &&
grep "Good signature from" actual || exit 1
Expand All @@ -67,7 +67,7 @@ test_expect_success GPG 'show signatures' '
'

test_expect_success GPG 'detect fudged signature' '
git cat-file commit master >raw &&
git cat-file commit seventh-signed >raw &&
sed -e "s/seventh/7th forged/" raw >forged1 &&
git hash-object -w -t commit forged1 >forged1.commit &&
Expand All @@ -77,7 +77,7 @@ test_expect_success GPG 'detect fudged signature' '
'

test_expect_success GPG 'detect fudged signature with NUL' '
git cat-file commit master >raw &&
git cat-file commit seventh-signed >raw &&
cat raw >forged2 &&
echo Qwik | tr "Q" "\000" >>forged2 &&
git hash-object -w -t commit forged2 >forged2.commit &&
Expand Down

0 comments on commit 526d56e

Please sign in to comment.