Skip to content

Commit 87a246e

Browse files
mhaggergitster
authored andcommitted
test-path-utils: Add subcommand "absolute_path"
Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f5114a4 commit 87a246e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test-path-utils.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ int main(int argc, char **argv)
2020
return 0;
2121
}
2222

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+
2332
if (argc == 4 && !strcmp(argv[1], "longest_ancestor_length")) {
2433
int len = longest_ancestor_length(argv[2], argv[3]);
2534
printf("%d\n", len);

0 commit comments

Comments
 (0)