mirror of
https://github.com/git/git.git
synced 2024-11-23 18:05:29 +08:00
c41244e702
So far, wildmatch() has always honoured directory boundary and there was no way to turn it off. Make it behave more like fnmatch() by requiring all callers that want the FNM_PATHNAME behaviour to pass that in the equivalent flag WM_PATHNAME. Callers that do not specify WM_PATHNAME will get wildcards like ? and * in their patterns matched against '/', just like not passing FNM_PATHNAME to fnmatch(). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
19 lines
346 B
C
19 lines
346 B
C
#ifndef WILDMATCH_H
|
|
#define WILDMATCH_H
|
|
|
|
#define WM_CASEFOLD 1
|
|
#define WM_PATHNAME 2
|
|
|
|
#define WM_ABORT_MALFORMED 2
|
|
#define WM_NOMATCH 1
|
|
#define WM_MATCH 0
|
|
#define WM_ABORT_ALL -1
|
|
#define WM_ABORT_TO_STARSTAR -2
|
|
|
|
struct wildopts;
|
|
|
|
int wildmatch(const char *pattern, const char *text,
|
|
unsigned int flags,
|
|
struct wildopts *wo);
|
|
#endif
|