{"size": 5052, "ext": "scrbl", "max_stars_repo_path": "libgit2/scribblings/pathspec.scrbl", "max_stars_repo_name": "guygastineau/libgit2", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "libgit2/scribblings/pathspec.scrbl", "max_issues_repo_name": "guygastineau/libgit2", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "libgit2/scribblings/pathspec.scrbl", "max_forks_repo_name": "guygastineau/libgit2", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 36.0857142857, "max_line_length": 332, "alphanum_fraction": 0.7387173397}
#lang scribble/manual

@(require (for-label racket))

@title{Pathspec}

@defmodule[libgit2/include/pathspec]


@defproc[(git_pathspec_free
          [ps pathspec?])
         void?]{
 Free a pathspec

}

@defproc[(git_pathspec_match_diff
          [diff diff?]
          [flags _git_pathspec_flag_t]
          [ps pathspec?])
         pathspec_match_list?]{
 Match a pathspec against files in a diff list.

 This matches the pathspec against the files in the given diff list.

 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_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

}

@defproc[(git_pathspec_match_index
          [index index?]
          [flags _git_pathspec_flag_t]
          [ps pathspec?])
         pathspec_match_list?]{
 Match a pathspec against entries in an index.

 This matches the pathspec against the files in the repository index.

 NOTE: At the moment, the case sensitivity of this match is controlled by the current case-sensitivity of the index object itself and the USE_CASE and IGNORE_CASE flags will have no effect. This behavior will be corrected in a future release.

 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_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

}

@defproc[(git_pathspec_match_list_diff_entry
          [m pathspec_match_list?]
          [pos integer?])
         git_diff_delta?]{
 Get a matching diff delta by position.

 This routine can only be used if the match list was generated by git_pathspec_match_diff. Otherwise it will always return NULL.

}

@defproc[(git_pathspec_match_list_entry
          [m pathspec_match_list?]
          [pos integer?])
         string?]{
 Get a matching filename by position.

 This routine cannot be used if the match list was generated by git_pathspec_match_diff. If so, it will always return NULL.

}

@defproc[(git_pathspec_match_list_entrycount
          [m pathspec_match_list?])
         integer?]{
 Get the number of items in a match list.

}

@defproc[(git_pathspec_match_list_failed_entry
          [m pathspec_match_list?]
          [pos size_t])
         string?]{
 Get an original pathspec string that had no matches.

 This will be return NULL for positions out of range.

}

@defproc[(git_pathspec_match_list_failed_entrycount
          [m pathspec_match_list?])
         integer?]{
 Get the number of pathspec items that did not match.

 This will be zero unless you passed GIT_PATHSPEC_FIND_FAILURES when generating the git_pathspec_match_list.

}

@defproc[(git_pathspec_match_list_free
          [m pathspec_match_list?])
         void?]{
 Free memory associates with a git_pathspec_match_list

}

@defproc[(git_pathspec_match_tree
          [tree tree?]
          [flags _git_pathspec_flag_t]
          [ps pathspec?])
         pathspec_match_list?]{
 Match a pathspec against files in a tree.

 This matches the pathspec against the files in the given tree.

 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_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

}

@defproc[(git_pathspec_match_workdir
          [repo repository?]
          [flags _git_pathspec_flag_t]
          [ps pathspec?])
         pathspec_match_list?]{
 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_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

}

@defproc[(git_pathspec_matches_path
          [ps pathspec?]
          [flags _git_pathspec_flag_t]
          [path string?])
         integer?]{
 Try to match a path against a pathspec

 Unlike most of the other pathspec matching functions, this will not fall back on the native case-sensitivity for your platform. You must explicitly pass flags to control case sensitivity or else this will fall back on being case sensitive.

}

@defproc[(git_pathspec_new
          [pathspec strarray?])
         pathspec?]{
 Compile a pathspec
}
