]> git.ipfire.org Git - thirdparty/git.git/blobdiff - repository.c
t4216: avoid unnecessary subshell in test_bloom_filters_not_used
[thirdparty/git.git] / repository.c
index a4174ddb0629cdd690142fb42c5d4182492485c4..6f7f6f002b1a45faa52305ca8c370e2e959b2f5e 100644 (file)
@@ -89,6 +89,10 @@ 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
 }
 
 /*