Skip to content

Commit

Permalink
test-path-utils: Add subcommand "absolute_path"
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed Aug 4, 2011
1 parent f5114a4 commit 87a246e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test-path-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 87a246e

Please sign in to comment.