SlHelpers
SlGit::PathSpec Class Reference

PathSpec is a representation of git pathspecs. More...

#include <PathSpec.h>

Public Member Functions

bool matchesPath (const std::string &path, uint32_t flags=GIT_PATHSPEC_DEFAULT) const noexcept
 Return true if this PathSpec matches path.
 
std::optional< PathSpecMatchListmatchWorkdir (const Repo &repo, uint32_t flags=GIT_PATHSPEC_DEFAULT) const noexcept
 Return paths this PathSpec matches in the workdir.
 
std::optional< PathSpecMatchListmatchIndex (const Index &index, uint32_t flags=GIT_PATHSPEC_DEFAULT) const noexcept
 Return paths this PathSpec matches in the index.
 
std::optional< PathSpecMatchListmatchTree (const Tree &tree, uint32_t flags=GIT_PATHSPEC_DEFAULT) const noexcept
 Return paths this PathSpec matches in the tree.
 
std::optional< PathSpecMatchListmatchDiff (const Diff &diff, uint32_t flags=GIT_PATHSPEC_DEFAULT) const noexcept
 Return paths this PathSpec matches in the diff.
 
GitTy * pathSpec () const noexcept
 Get the stored pointer to libgit2's git_pathspec.
 
 operator GitTy * () const noexcept
 Alias for pathSpec() – implicit conversion.
 

Static Public Member Functions

static std::optional< PathSpeccreate (const std::vector< std::string > &pathSpec) noexcept
 Create a new PathSpec, to match every path in pathSpec.
 

Friends

class Repo
 

Detailed Description

PathSpec is a representation of git pathspecs.


The documentation for this class was generated from the following file: