aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-hash.c
diff options
context:
space:
mode:
Diffstat (limited to 't/helper/test-hash.c')
-rw-r--r--t/helper/test-hash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/helper/test-hash.c b/t/helper/test-hash.c
index 45d829c908..aa82638c62 100644
--- a/t/helper/test-hash.c
+++ b/t/helper/test-hash.c
@@ -1,7 +1,7 @@
#include "test-tool.h"
#include "hex.h"
-int cmd_hash_impl(int ac, const char **av, int algo)
+int cmd_hash_impl(int ac, const char **av, int algo, int unsafe)
{
git_hash_ctx ctx;
unsigned char hash[GIT_MAX_HEXSZ];
@@ -9,6 +9,8 @@ int cmd_hash_impl(int ac, const char **av, int algo)
int binary = 0;
char *buffer;
const struct git_hash_algo *algop = &hash_algos[algo];
+ if (unsafe)
+ algop = unsafe_hash_algo(algop);
if (ac == 2) {
if (!strcmp(av[1], "-b"))