summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-08-04 04:47:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-04 22:57:18 (GMT)
commit87a246e1b562544c25af66f4712cd81bc64f2d44 (patch)
treed1daf6c49a25ea66b0a398520fe7758f61400739
parentf5114a40c0d0276ce6ff215a3dc51eb19da5b420 (diff)
downloadgit-87a246e1b562544c25af66f4712cd81bc64f2d44.zip
git-87a246e1b562544c25af66f4712cd81bc64f2d44.tar.gz
git-87a246e1b562544c25af66f4712cd81bc64f2d44.tar.bz2
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>
-rw-r--r--test-path-utils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test-path-utils.c b/test-path-utils.c
index e767159..a410e30 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);