summaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-03-30 14:04:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-03-30 17:59:08 (GMT)
commited4b804e46b177203b4035cf5a1271f50724ba1c (patch)
treecce344989c3a9fa435f264d590d4a2fcc0825a23 /t/helper
parentfe299ec5ae7b419990bbc3efd4e6bfa3f0773b45 (diff)
downloadgit-ed4b804e46b177203b4035cf5a1271f50724ba1c.zip
git-ed4b804e46b177203b4035cf5a1271f50724ba1c.tar.gz
git-ed4b804e46b177203b4035cf5a1271f50724ba1c.tar.bz2
test-tool: rename sha1-array to oid-array
This matches the actual data structure name, as well as the source file that contains the code we're testing. The test scripts need updating to use the new name, as well. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-oid-array.c (renamed from t/helper/test-sha1-array.c)6
-rw-r--r--t/helper/test-tool.c2
-rw-r--r--t/helper/test-tool.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/t/helper/test-sha1-array.c b/t/helper/test-oid-array.c
index 6f7d3b9..ce9fd5f 100644
--- a/t/helper/test-sha1-array.c
+++ b/t/helper/test-oid-array.c
@@ -8,7 +8,7 @@ static int print_oid(const struct object_id *oid, void *data)
return 0;
}
-int cmd__sha1_array(int argc, const char **argv)
+int cmd__oid_array(int argc, const char **argv)
{
struct oid_array array = OID_ARRAY_INIT;
struct strbuf line = STRBUF_INIT;
@@ -19,11 +19,11 @@ int cmd__sha1_array(int argc, const char **argv)
if (skip_prefix(line.buf, "append ", &arg)) {
if (get_oid_hex(arg, &oid))
- die("not a hexadecimal SHA1: %s", arg);
+ die("not a hexadecimal oid: %s", arg);
oid_array_append(&array, &oid);
} else if (skip_prefix(line.buf, "lookup ", &arg)) {
if (get_oid_hex(arg, &oid))
- die("not a hexadecimal SHA1: %s", arg);
+ die("not a hexadecimal oid: %s", arg);
printf("%d\n", oid_array_lookup(&array, &oid));
} else if (!strcmp(line.buf, "clear"))
oid_array_clear(&array);
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index c9a232d..c79c6ec 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -36,6 +36,7 @@ static struct test_cmd cmds[] = {
{ "match-trees", cmd__match_trees },
{ "mergesort", cmd__mergesort },
{ "mktemp", cmd__mktemp },
+ { "oid-array", cmd__oid_array },
{ "oidmap", cmd__oidmap },
{ "online-cpus", cmd__online_cpus },
{ "parse-options", cmd__parse_options },
@@ -56,7 +57,6 @@ static struct test_cmd cmds[] = {
{ "scrap-cache-tree", cmd__scrap_cache_tree },
{ "serve-v2", cmd__serve_v2 },
{ "sha1", cmd__sha1 },
- { "sha1-array", cmd__sha1_array },
{ "sha256", cmd__sha256 },
{ "sigchain", cmd__sigchain },
{ "strcmp-offset", cmd__strcmp_offset },
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index c8549fd..a082516 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -46,7 +46,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_array(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);
int cmd__strcmp_offset(int argc, const char **argv);