1 #include "git-compat-util.h"
6 int (*fn)(int argc, const char **argv);
9 static struct test_cmd cmds[] = {
10 { "chmtime", cmd__chmtime },
11 { "lazy-init-name-hash", cmd__lazy_init_name_hash },
12 { "sha1", cmd__sha1 },
15 int cmd_main(int argc, const char **argv)
20 die("I need a test name!");
22 for (i = 0; i < ARRAY_SIZE(cmds); i++) {
23 if (!strcmp(cmds[i].name, argv[1])) {
26 return cmds[i].fn(argc, argv);
29 die("There is no test named '%s'", argv[1]);