]>
git.proxmox.com Git - libgit2.git/blob - src/pathspec.h
2 * Copyright (C) 2011-2012 the libgit2 contributors
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_pathspec_h__
8 #define INCLUDE_pathspec_h__
15 /* what is the common non-wildcard prefix for all items in the pathspec */
16 extern char *git_pathspec_prefix(const git_strarray
*pathspec
);
18 /* is there anything in the spec that needs to be filtered on */
19 extern bool git_pathspec_is_interesting(const git_strarray
*pathspec
);
21 /* build a vector of fnmatch patterns to evaluate efficiently */
22 extern int git_pathspec_init(
23 git_vector
*vspec
, const git_strarray
*strspec
, git_pool
*strpool
);
25 /* free data from the pathspec vector */
26 extern void git_pathspec_free(git_vector
*vspec
);
28 /* match a path against the vectorized pathspec */
29 extern bool git_pathspec_match_path(
30 git_vector
*vspec
, const char *path
, bool disable_fnmatch
, bool casefold
);