t/helper: merge (unused) test-match-trees into test-tool
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 24 Mar 2018 07:44:45 +0000 (08:44 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Mar 2018 15:45:47 +0000 (08:45 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
t/helper/test-match-trees.c
t/helper/test-tool.c
t/helper/test-tool.h
index d7342e3a8bc92a1486d8bee6a9fde13b71a092cd..6552a8f4edf7a5c877841b3c82a557c8d8d53791 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -665,13 +665,13 @@ TEST_BUILTINS_OBJS += test-genrandom.o
 TEST_BUILTINS_OBJS += test-hashmap.o
 TEST_BUILTINS_OBJS += test-index-version.o
 TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
+TEST_BUILTINS_OBJS += test-match-trees.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
 TEST_PROGRAMS_NEED_X += test-fake-ssh
 TEST_PROGRAMS_NEED_X += test-line-buffer
-TEST_PROGRAMS_NEED_X += test-match-trees
 TEST_PROGRAMS_NEED_X += test-mergesort
 TEST_PROGRAMS_NEED_X += test-mktemp
 TEST_PROGRAMS_NEED_X += test-online-cpus
index 356d8edef1d25524abaae0f0fcb3bf072d229c30..96857f26ac8540cf22e74aed72bbd30bc8147f00 100644 (file)
@@ -1,7 +1,8 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "tree.h"
 
-int cmd_main(int ac, const char **av)
+int cmd__match_trees(int ac, const char **av)
 {
        struct object_id hash1, hash2, shifted;
        struct tree *one, *two;
index d38d4ddc725aa9b0e9dfa2221f1eb47e0cafef75..16c78833a4e7598b3406fa070d18ece908d87856 100644 (file)
@@ -20,6 +20,7 @@ static struct test_cmd cmds[] = {
        { "hashmap", cmd__hashmap },
        { "index-version", cmd__index_version },
        { "lazy-init-name-hash", cmd__lazy_init_name_hash },
+       { "match-trees", cmd__match_trees },
        { "sha1", cmd__sha1 },
 };
 
index b855203477fb5b9c3b764c4ba2e40e3919110b0d..d2f009cb3e409d5541b6f93a6b3604b69a2022f1 100644 (file)
@@ -14,6 +14,7 @@ int cmd__genrandom(int argc, const char **argv);
 int cmd__hashmap(int argc, const char **argv);
 int cmd__index_version(int argc, const char **argv);
 int cmd__lazy_init_name_hash(int argc, const char **argv);
+int cmd__match_trees(int argc, const char **argv);
 int cmd__sha1(int argc, const char **argv);
 
 #endif