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

@ -89,10 +89,6 @@ void repo_set_gitdir(struct repository *repo,
void repo_set_hash_algo(struct repository *repo, int hash_algo)
{
repo->hash_algo = &hash_algos[hash_algo];
#ifndef ENABLE_SHA256
if (hash_algo != GIT_HASH_SHA1)
die(_("The hash algorithm %s is not supported in this build."), repo->hash_algo->name);
#endif
}
/*