Skip to content

Commit

Permalink
t6301: make hash size independent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bk2204 authored and gitster committed Jul 30, 2020
1 parent 08fbc5d commit abe3db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t6301-for-each-ref-errors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit abe3db1

Please sign in to comment.