t6301: make hash size independent

Instead of hard-coding a fixed length example object ID in the test,
compute one using the translation tables.  Move a variable into the
setup block so that we can ensure the exit status of test_oid is
checked.

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>
This commit is contained in:
brian m. carlson 2020-07-29 23:13:56 +00:00 коммит произвёл Junio C Hamano
Родитель 08fbc5d0b2
Коммит abe3db14cb
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -5,9 +5,9 @@ test_description='for-each-ref errors for broken refs'
. ./test-lib.sh
ZEROS=$ZERO_OID
MISSING=abababababababababababababababababababab
test_expect_success setup '
MISSING=$(test_oid deadbeef) &&
git commit --allow-empty -m "Initial" &&
git tag testtag &&
git for-each-ref >full-list &&