libgit2

git_pathspec_matches_path

Version:

Try to match a path against a pathspec

Unlike most of the other pathspec matching functions, this will not fall back on the native case-sensitivity for your platform. You must explicitly pass flags to control case sensitivity or else this will fall back on being case sensitive.

Signature

int git_pathspec_matches_path(const git_pathspec *ps, uint32_t flags, const char *path);

Parameters

In
ps

The compiled pathspec

uint32_t
In
flags

Combination of git_pathspec_flag_t options to control match

const char *
In
path

The pathname to attempt to match

Returns

int

1 is path matches spec, 0 if it does not

Versions