From: Michael Haggerty Date: Thu, 4 Aug 2011 04:47:47 +0000 (+0200) Subject: test-path-utils: Add subcommand "absolute_path" X-Git-Tag: v1.7.7-rc0~23^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=87a246e1b562544c25af66f4712cd81bc64f2d44;p=git.git test-path-utils: Add subcommand "absolute_path" Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- diff --git a/test-path-utils.c b/test-path-utils.c index e7671593d..a410e3026 100644 --- a/test-path-utils.c +++ b/test-path-utils.c @@ -20,6 +20,15 @@ int main(int argc, char **argv) return 0; } + if (argc >= 2 && !strcmp(argv[1], "absolute_path")) { + while (argc > 2) { + puts(absolute_path(argv[2])); + argc--; + argv++; + } + return 0; + } + if (argc == 4 && !strcmp(argv[1], "longest_ancestor_length")) { int len = longest_ancestor_length(argv[2], argv[3]); printf("%d\n", len);