]> git.proxmox.com Git - libgit2.git/blame - src/pathspec.h
Fixed size_t format string warning
[libgit2.git] / src / pathspec.h
CommitLineData
2e3d4b96
RB
1/*
2 * Copyright (C) 2011-2012 the libgit2 contributors
3 *
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.
6 */
7#ifndef INCLUDE_pathspec_h__
8#define INCLUDE_pathspec_h__
9
10#include "common.h"
11#include "buffer.h"
12#include "vector.h"
13#include "pool.h"
14
15/* what is the common non-wildcard prefix for all items in the pathspec */
16extern char *git_pathspec_prefix(const git_strarray *pathspec);
17
18/* is there anything in the spec that needs to be filtered on */
19extern bool git_pathspec_is_interesting(const git_strarray *pathspec);
20
21/* build a vector of fnmatch patterns to evaluate efficiently */
22extern int git_pathspec_init(
23 git_vector *vspec, const git_strarray *strspec, git_pool *strpool);
24
25/* free data from the pathspec vector */
26extern void git_pathspec_free(git_vector *vspec);
27
28/* match a path against the vectorized pathspec */
29extern bool git_pathspec_match_path(
30 git_vector *vspec, const char *path, bool disable_fnmatch, bool casefold);
31
32#endif