git_pathspec_match_workdir

Match a pathspec against the working directory of a repository.

This matches the pathspec against the current files in the working directory of the repository. It is an error to invoke this on a bare repo. This handles git ignores (i.e. ignored files will not be considered to match the pathspec unless the file is tracked in the index).

If out is not null, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the git_pathspec_flag_t.GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the git_pathspec_flag_t.GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

extern (C) nothrow @nogc
int
git_pathspec_match_workdir

Parameters

out_ .git_pathspec_match_list**

Output list of matches; pass null to just get return value

repo libgit2_d.types.git_repository*

The repository in which to match; bare repo is an error

flags uint

Combination of git_pathspec_flag_t options to control match

ps .git_pathspec*

Pathspec to be matched

Return Value

Type: int

0 on success, -1 on error, git_error_code.GIT_ENOTFOUND if no matches and the git_pathspec_flag_t.GIT_PATHSPEC_NO_MATCH_ERROR flag was given

Meta