28 Pathspec
(require libgit2/include/pathspec) | package: libgit2 |
procedure
(git_pathspec_free ps) → void?
ps : pathspec?
procedure
(git_pathspec_match_diff diff flags ps) → pathspec_match_list?
diff : diff? flags : git_pathspec_flag_t ps : pathspec?
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.
procedure
(git_pathspec_match_index index flags ps) → pathspec_match_list?
index : index? flags : git_pathspec_flag_t ps : pathspec?
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.
procedure
(git_pathspec_match_list_diff_entry m pos) → git_diff_delta?
m : pathspec_match_list? pos : integer?
This routine can only be used if the match list was generated by git_pathspec_match_diff. Otherwise it will always return NULL.
This routine cannot be used if the match list was generated by git_pathspec_match_diff. If so, it will always return NULL.
procedure
(git_pathspec_match_list_entrycount m) → integer?
m : pathspec_match_list?
procedure
(git_pathspec_match_list_failed_entry m pos) → string? m : pathspec_match_list? pos : size_t
This will be return NULL for positions out of range.
procedure
(git_pathspec_match_list_failed_entrycount m) → integer?
m : pathspec_match_list?
This will be zero unless you passed GIT_PATHSPEC_FIND_FAILURES when generating the git_pathspec_match_list.
procedure
(git_pathspec_match_list_free m) → void?
m : pathspec_match_list?
procedure
(git_pathspec_match_tree tree flags ps) → pathspec_match_list?
tree : tree? flags : git_pathspec_flag_t ps : pathspec?
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.
procedure
(git_pathspec_match_workdir repo flags ps) → pathspec_match_list?
repo : repository? flags : git_pathspec_flag_t ps : pathspec?
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.
procedure
(git_pathspec_matches_path ps flags path) → integer?
ps : pathspec? flags : git_pathspec_flag_t path : string?
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.