read-cache: add post-index-change hook
[gitweb.git] / t / helper / test-match-trees.c
index d446b8eaca727dfa9c1b0928f2b8c9af286f2702..96857f26ac8540cf22e74aed72bbd30bc8147f00 100644 (file)
@@ -1,7 +1,8 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "tree.h"
 
-int main(int ac, char **av)
+int cmd__match_trees(int ac, const char **av)
 {
        struct object_id hash1, hash2, shifted;
        struct tree *one, *two;
@@ -12,10 +13,10 @@ int main(int ac, char **av)
                die("cannot parse %s as an object name", av[1]);
        if (get_oid(av[2], &hash2))
                die("cannot parse %s as an object name", av[2]);
-       one = parse_tree_indirect(hash1.hash);
+       one = parse_tree_indirect(&hash1);
        if (!one)
                die("not a tree-ish %s", av[1]);
-       two = parse_tree_indirect(hash2.hash);
+       two = parse_tree_indirect(&hash2);
        if (!two)
                die("not a tree-ish %s", av[2]);