git-commit-vandalism/test-wildmatch.c
Nguyễn Thái Ngọc Duy 9b4edc0a49 wildmatch: remove static variable force_lower_case
One place less to worry about thread safety. Also combine wildmatch
and iwildmatch into one.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-15 14:58:18 -07:00

15 lines
363 B
C

#include "cache.h"
#include "wildmatch.h"
int main(int argc, char **argv)
{
if (!strcmp(argv[1], "wildmatch"))
return !!wildmatch(argv[3], argv[2], 0);
else if (!strcmp(argv[1], "iwildmatch"))
return !!wildmatch(argv[3], argv[2], FNM_CASEFOLD);
else if (!strcmp(argv[1], "fnmatch"))
return !!fnmatch(argv[3], argv[2], FNM_PATHNAME);
else
return 1;
}