summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 87a246e)
raw | patch | inline | side by side (parent: 87a246e)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Thu, 4 Aug 2011 04:47:48 +0000 (06:47 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 4 Aug 2011 22:57:18 +0000 (15:57 -0700) |
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test-path-utils.c | patch | blob | history |
diff --git a/test-path-utils.c b/test-path-utils.c
index a410e3026f6cd26f40bebe903d6d1d69350cfd7b..3bc20e91da561f4edd5c3eddb0988735759234e4 100644 (file)
--- a/test-path-utils.c
+++ b/test-path-utils.c
return 0;
}
+ if (argc >= 4 && !strcmp(argv[1], "prefix_path")) {
+ char *prefix = argv[2];
+ int prefix_len = strlen(prefix);
+ int nongit_ok;
+ setup_git_directory_gently(&nongit_ok);
+ while (argc > 3) {
+ puts(prefix_path(prefix, prefix_len, argv[3]));
+ argc--;
+ argv++;
+ }
+ return 0;
+ }
+
if (argc == 4 && !strcmp(argv[1], "strip_path_suffix")) {
char *prefix = strip_path_suffix(argv[2], argv[3]);
printf("%s\n", prefix ? prefix : "(null)");