repository: enable SHA-256 support by default

Now that we have a complete SHA-256 implementation in Git, let's enable
it so people can use it.  Remove the ENABLE_SHA256 define constant
everywhere it's used.  Add tests for initializing a repository with
SHA-256.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
brian m. carlson
2020-07-29 23:14:22 +00:00
committed by Junio C Hamano
parent b5b46d7973
commit eff45daab8
4 changed files with 33 additions and 11 deletions

View File

@ -183,11 +183,6 @@ void initialize_repository_version(int hash_algo)
char repo_version_string[10];
int repo_version = GIT_REPO_VERSION;
#ifndef ENABLE_SHA256
if (hash_algo != GIT_HASH_SHA1)
die(_("The hash algorithm %s is not supported in this build."), hash_algos[hash_algo].name);
#endif
if (hash_algo != GIT_HASH_SHA1)
repo_version = GIT_REPO_VERSION_READ;