Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-10-15 10:25:55 +0400
committerJunio C Hamano <gitster@pobox.com>2012-10-16 01:58:17 +0400
commitfeabcc173b7a5f55c2b1ec78f230276c63ae4d36 (patch)
tree54d1d16fa85bcd0a76b7099bf2a12139f82fb994 /test-wildmatch.c
parent327f2f3ebb2310653e78244293f6f34b28571142 (diff)
Integrate wildmatch to git
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-wildmatch.c')
-rw-r--r--test-wildmatch.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test-wildmatch.c b/test-wildmatch.c
new file mode 100644
index 0000000000..ac5642037d
--- /dev/null
+++ b/test-wildmatch.c
@@ -0,0 +1,14 @@
+#include "cache.h"
+#include "wildmatch.h"
+
+int main(int argc, char **argv)
+{
+ if (!strcmp(argv[1], "wildmatch"))
+ return wildmatch(argv[3], argv[2]) ? 0 : 1;
+ else if (!strcmp(argv[1], "iwildmatch"))
+ return iwildmatch(argv[3], argv[2]) ? 0 : 1;
+ else if (!strcmp(argv[1], "fnmatch"))
+ return !!fnmatch(argv[3], argv[2], FNM_PATHNAME);
+ else
+ return 1;
+}