9#include "../git/PathSpec.h"
24 unsigned match(
const std::filesystem::path &path)
const {
25 if (m_pathspec.matchesPath(path))
35 static std::optional<Pattern>
create(std::string pattern);
40 Pattern(
SlGit::PathSpec pathspec,
unsigned weight) : m_pathspec(std::move(pathspec)),
43 static constexpr unsigned pattern_weight(std::string_view pattern);
PathSpec is a representation of git pathspecs.
Definition PathSpec.h:68
static std::optional< Pattern > create(std::string pattern)
Build a (git) Pattern.
unsigned match(const std::filesystem::path &path) const
Match a path against the stored patterns.
Definition Pattern.h:24