test-path-utils: Add subcommand "absolute_path"
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Aug 4, 2011 at 06:47 UTC
87a246e1b562544c25af66f4712cd81bc64f2d44
1 file changed
+9
test-path-utils.c
+9
@@ -20,6 +20,15 @@ int main(int argc, char **argv)
20
return 0;
21
}
22
23
+ if (argc >= 2 && !strcmp(argv[1], "absolute_path")) {
24
+ while (argc > 2) {
25
+ puts(absolute_path(argv[2]));
26
+ argc--;
27
+ argv++;
28
+ }
29
+ return 0;
30
+ }
31
+
32
if (argc == 4 && !strcmp(argv[1], "longest_ancestor_length")) {
33
int len = longest_ancestor_length(argv[2], argv[3]);
34
printf("%d\n", len);