mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
![Nguyễn Thái Ngọc Duy](/assets/img/avatar_default.png)
wildmatch returns non-zero if matched, zero otherwise. This patch makes it return zero if matches, non-zero otherwise, like fnmatch(). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 lines
347 B
C
15 lines
347 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]);
|
|
else if (!strcmp(argv[1], "iwildmatch"))
|
|
return !!iwildmatch(argv[3], argv[2]);
|
|
else if (!strcmp(argv[1], "fnmatch"))
|
|
return !!fnmatch(argv[3], argv[2], FNM_PATHNAME);
|
|
else
|
|
return 1;
|
|
}
|