git p4: implement view spec wildcards with "p4 where"
[gitweb.git] / test-path-utils.c
index 8a6d22404e186521d495d9d4d244d0ac42048381..bb975e4d3eaf54bb162ecdad8b4b8995c84fb035 100644 (file)
@@ -116,15 +116,22 @@ int main(int argc, char **argv)
                return 0;
        }
 
+       if (argc == 3 && !strcmp(argv[1], "mingw_path")) {
+               puts(argv[2]);
+               return 0;
+       }
+
        if (argc == 4 && !strcmp(argv[1], "relative_path")) {
+               struct strbuf sb = STRBUF_INIT;
                const char *in, *prefix, *rel;
                normalize_argv_string(&in, argv[2]);
                normalize_argv_string(&prefix, argv[3]);
-               rel = relative_path(in, prefix);
+               rel = relative_path(in, prefix, &sb);
                if (!rel)
                        puts("(null)");
                else
                        puts(strlen(rel) > 0 ? rel : "(empty)");
+               strbuf_release(&sb);
                return 0;
        }