Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2022-11-19 02:43:07 +0300
committerTaylor Blau <me@ttaylorr.com>2022-11-19 02:43:07 +0300
commite53598a5ab745fb633dc99ed11cbe4b1bee066fa (patch)
tree5f1e55d655e80ec01df80953e091920e681669b8 /t/helper
parent69c1d609badb0d672df9bf0c693ebb63c52a0fe4 (diff)
parentd00fa5528b44a8a4e59cb16348f2ddb46f0190ee (diff)
Merge branch 'ab/sha-makefile-doc'
Makefile comments updates and reordering to clarify knobs used to choose SHA implementations. * ab/sha-makefile-doc: Makefile: discuss SHAttered in *_SHA{1,256} discussion Makefile: document default SHA-1 backend on OSX Makefile & test-tool: replace "DC_SHA1" variable with a "define" Makefile: document SHA-1 and SHA-256 default and selection order Makefile: document default SHA-256 backend Makefile: rephrase the discussion of *_SHA1 knobs Makefile: create and use sections for "define" flag listing Makefile: correct DC_SHA1 documentation INSTALL: remove discussion of SHA-1 backends Makefile: always (re)set DC_SHA1 on fallback
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-sha1.c8
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/t/helper/test-sha1.c b/t/helper/test-sha1.c
index d860c387c3..71fe5c6145 100644
--- a/t/helper/test-sha1.c
+++ b/t/helper/test-sha1.c
@@ -5,3 +5,11 @@ int cmd__sha1(int ac, const char **av)
{
return cmd_hash_impl(ac, av, GIT_HASH_SHA1);
}
+
+int cmd__sha1_is_sha1dc(int argc UNUSED, const char **argv UNUSED)
+{
+#ifdef platform_SHA_IS_SHA1DC
+ return 0;
+#endif
+ return 1;
+}
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 01cda9358d..775854c9f9 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -73,6 +73,7 @@ static struct test_cmd cmds[] = {
{ "scrap-cache-tree", cmd__scrap_cache_tree },
{ "serve-v2", cmd__serve_v2 },
{ "sha1", cmd__sha1 },
+ { "sha1-is-sha1dc", cmd__sha1_is_sha1dc },
{ "sha256", cmd__sha256 },
{ "sigchain", cmd__sigchain },
{ "simple-ipc", cmd__simple_ipc },
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index ca2948066f..7cf84eca12 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -66,6 +66,7 @@ int cmd__run_command(int argc, const char **argv);
int cmd__scrap_cache_tree(int argc, const char **argv);
int cmd__serve_v2(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv);
+int cmd__sha1_is_sha1dc(int argc, const char **argv);
int cmd__oid_array(int argc, const char **argv);
int cmd__sha256(int argc, const char **argv);
int cmd__sigchain(int argc, const char **argv);