Skip to content

Commit 6866b42

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c470ac4 commit 6866b42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t1007-hash-object.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ test_expect_success '--literally complains about non-standard types' '
252252
test_must_fail git hash-object -t bogus --literally --stdin
253253
'
254254

255-
test_expect_success '--stdin outside of repository (uses SHA-1)' '
255+
test_expect_success '--stdin outside of repository (uses default hash)' '
256256
nongit git hash-object --stdin <hello >actual &&
257-
echo "$(test_oid --hash=sha1 hello)" >expect &&
257+
echo "$(test_oid --hash=builtin hello)" >expect &&
258258
test_cmp expect actual
259259
'
260260

0 commit comments

Comments
 (0)