From: brian m. carlson Date: Fri, 20 Jun 2025 01:19:41 +0000 (+0000) Subject: t5300: choose the built-in hash outside of a repo X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=231c9ff200f76d61c794db424fdc9ee59d7ff977;p=thirdparty%2Fgit.git t5300: 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, look up the default hash algorithm for operating outside of a repository using an appropriate environment variable, which will always be correct. Additionally, for operations outside of a repository, use the DEFAULT_HASH_ALGORITHM prerequisite rather than SHA1. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index a5932b6a8b..5013373891 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -525,7 +525,7 @@ test_expect_success 'index-pack --strict works in non-repo' ' test_path_is_file foo.idx ' -test_expect_success SHA1 'show-index works OK outside a repository' ' +test_expect_success DEFAULT_HASH_ALGORITHM 'show-index works OK outside a repository' ' nongit git show-index