Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/helper/test-wildmatch.c # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / helper / test-wildmatch.c` 24 lines ยท 755 bytes Raw Blame History 1 #include "test-tool.h" 2 #include "wildmatch.h" 3 4 int cmd__wildmatch(int argc, const char **argv) 5 { 6 int i; 7 for (i = 2; i < argc; i++) { 8 if (argv[i][0] == '/') 9 die("Forward slash is not allowed at the beginning of the\n" 10 "pattern because Windows does not like it. Use `XXX/' instead."); 11 else if (!strncmp(argv[i], "XXX/", 4)) 12 argv[i] += 3; 13 } 14 if (!strcmp(argv[1], "wildmatch")) 15 return !!wildmatch(argv[3], argv[2], WM_PATHNAME); 16 else if (!strcmp(argv[1], "iwildmatch")) 17 return !!wildmatch(argv[3], argv[2], WM_PATHNAME | WM_CASEFOLD); 18 else if (!strcmp(argv[1], "pathmatch")) 19 return !!wildmatch(argv[3], argv[2], 0); 20 else if (!strcmp(argv[1], "ipathmatch")) 21 return !!wildmatch(argv[3], argv[2], WM_CASEFOLD); 22 else 23 return 1; 24 }