mirror of
https://github.com/git/git.git
synced 2026-01-11 13:23:12 +09:00
t1007: choose the built-in hash outside of a repo
Right now, the built-in default hash is always SHA-1, but that will change in a future commit. Instead of assuming that operating outside of a repository will always use SHA-1, simply ask test_oid for the built-in hash instead, which will always be correct. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c470ac4ac4
commit
6866b42260
@ -252,9 +252,9 @@ test_expect_success '--literally complains about non-standard types' '
|
||||
test_must_fail git hash-object -t bogus --literally --stdin
|
||||
'
|
||||
|
||||
test_expect_success '--stdin outside of repository (uses SHA-1)' '
|
||||
test_expect_success '--stdin outside of repository (uses default hash)' '
|
||||
nongit git hash-object --stdin <hello >actual &&
|
||||
echo "$(test_oid --hash=sha1 hello)" >expect &&
|
||||
echo "$(test_oid --hash=builtin hello)" >expect &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user