diff options
Diffstat (limited to 't/helper/test-path-utils.c')
| -rw-r--r-- | t/helper/test-path-utils.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/t/helper/test-path-utils.c b/t/helper/test-path-utils.c index d20e1b7a18..023ed2e1a7 100644 --- a/t/helper/test-path-utils.c +++ b/t/helper/test-path-utils.c @@ -1,14 +1,21 @@ #include "test-tool.h" -#include "cache.h" +#include "abspath.h" +#include "environment.h" +#include "path.h" +#include "read-cache-ll.h" +#include "setup.h" #include "string-list.h" +#include "trace.h" #include "utf8.h" +#include "copy.h" /* * A "string_list_each_func_t" function that normalizes an entry from * GIT_CEILING_DIRECTORIES. If the path is unusable for some reason, * die with an explanation. */ -static int normalize_ceiling_entry(struct string_list_item *item, void *unused) +static int normalize_ceiling_entry(struct string_list_item *item, + void *data UNUSED) { char *ceil = item->string; @@ -494,6 +501,16 @@ int cmd__path_utils(int argc, const char **argv) return !!res; } + if (argc == 4 && !strcmp(argv[1], "do_files_match")) { + int ret = do_files_match(argv[2], argv[3]); + + if (ret) + printf("equal\n"); + else + printf("different\n"); + return !ret; + } + fprintf(stderr, "%s: unknown function name: %s\n", argv[0], argv[1] ? argv[1] : "(there was none)"); return 1; |
