mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
t6006: make hash size independent
Instead of hard-coding the length of an object ID when creating a tree, compute it for the hash in use using the translation tables. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5db24dcffd
commit
edf04243b2
|
@ -32,6 +32,7 @@ changed_iso88591=$(echo "$changed" | iconv -f utf-8 -t $test_encoding)
|
|||
truncate_count=20
|
||||
|
||||
test_expect_success 'setup' '
|
||||
test_oid_init &&
|
||||
: >foo &&
|
||||
git add foo &&
|
||||
git config i18n.commitEncoding $test_encoding &&
|
||||
|
@ -463,9 +464,10 @@ test_expect_success '--abbrev' '
|
|||
'
|
||||
|
||||
test_expect_success '%H is not affected by --abbrev-commit' '
|
||||
expected=$(($(test_oid hexsz) + 1)) &&
|
||||
git log -1 --format=%H --abbrev-commit --abbrev=20 HEAD >actual &&
|
||||
len=$(wc -c <actual) &&
|
||||
test $len = 41
|
||||
test $len = $expected
|
||||
'
|
||||
|
||||
test_expect_success '%h is not affected by --abbrev-commit' '
|
||||
|
|
Loading…
Reference in a new issue