Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-07-30 02:13:58 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-30 19:16:46 +0300
commit252a4ee66aa5d0d872b14095047e605367f4d34c (patch)
tree07ed048fcd5b714e8d8dbc89daac51eda0fcf09b /t/t6501-freshen-objects.sh
parent368f3cb051cfb27b3b12715416787481ec903786 (diff)
t6501: avoid hard-coded objects
This test contains hard-coded invalid object IDs. Make it hash size independent by generating invalid object IDs using the translation tables. Add a setup target to ensure the output of test_oid_init is checked properly. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6501-freshen-objects.sh')
-rwxr-xr-xt/t6501-freshen-objects.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/t/t6501-freshen-objects.sh b/t/t6501-freshen-objects.sh
index f30b4849b6..8a3bb4105b 100755
--- a/t/t6501-freshen-objects.sh
+++ b/t/t6501-freshen-objects.sh
@@ -128,9 +128,9 @@ for repack in '' true; do
done
test_expect_success 'do not complain about existing broken links (commit)' '
- cat >broken-commit <<-\EOF &&
- tree 0000000000000000000000000000000000000001
- parent 0000000000000000000000000000000000000002
+ cat >broken-commit <<-EOF &&
+ tree $(test_oid 001)
+ parent $(test_oid 002)
author whatever <whatever@example.com> 1234 -0000
committer whatever <whatever@example.com> 1234 -0000
@@ -143,8 +143,8 @@ test_expect_success 'do not complain about existing broken links (commit)' '
'
test_expect_success 'do not complain about existing broken links (tree)' '
- cat >broken-tree <<-\EOF &&
- 100644 blob 0000000000000000000000000000000000000003 foo
+ cat >broken-tree <<-EOF &&
+ 100644 blob $(test_oid 003) foo
EOF
tree=$(git mktree --missing <broken-tree) &&
git gc -q 2>stderr &&
@@ -153,8 +153,8 @@ test_expect_success 'do not complain about existing broken links (tree)' '
'
test_expect_success 'do not complain about existing broken links (tag)' '
- cat >broken-tag <<-\EOF &&
- object 0000000000000000000000000000000000000004
+ cat >broken-tag <<-EOF &&
+ object $(test_oid 004)
type commit
tag broken
tagger whatever <whatever@example.com> 1234 -0000