]> git.ipfire.org Git - thirdparty/git.git/commit
t5300: choose the built-in hash outside of a repo
authorbrian m. carlson <sandals@crustytoothpaste.net>
Tue, 1 Jul 2025 21:22:35 +0000 (21:22 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 1 Jul 2025 21:58:26 +0000 (14:58 -0700)
commit9d619f2ef8c95a791d34f5d3cb2793dcc0b8610d
tree4e53ca88f262e61ada3f6c6473e4e936326a1400
parentf957ce078f61266b3212b88d9c357a1b7f071a6f
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 <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5300-pack-object.sh