/* * Copyright (C) 2011-2012 the libgit2 contributors * * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. */#ifndef INCLUDE_pathspec_h__#define INCLUDE_pathspec_h__#include "common.h"#include "buffer.h"#include "vector.h"#include "pool.h"/* what is the common non-wildcard prefix for all items in the pathspec */externchar*git_pathspec_prefix(constgit_strarray*pathspec);/* is there anything in the spec that needs to be filtered on */externboolgit_pathspec_is_interesting(constgit_strarray*pathspec);/* build a vector of fnmatch patterns to evaluate efficiently */externintgit_pathspec_init(git_vector*vspec,constgit_strarray*strspec,git_pool*strpool);/* free data from the pathspec vector */externvoidgit_pathspec_free(git_vector*vspec);/* match a path against the vectorized pathspec */externboolgit_pathspec_match_path(git_vector*vspec,constchar*path,booldisable_fnmatch,boolcasefold);#endif