On this page:
8.18
top
up

28PathspecπŸ”— i

procedure

( git_pathspec_freeps)void?

ps:pathspec?
Free a pathspec

procedure

( git_pathspec_match_diffdiffflagsps)pathspec_match_list?

diff:diff?
flags:git_pathspec_flag_t
ps:pathspec?
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.

procedure

( git_pathspec_match_indexindexflagsps)pathspec_match_list?

index:index?
flags:git_pathspec_flag_t
ps:pathspec?
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.

procedure

( git_pathspec_match_list_diff_entrympos)git_diff_delta?

m:pathspec_match_list?
pos:integer?
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.

procedure

( git_pathspec_match_list_entrympos)string?

m:pathspec_match_list?
pos:integer?
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.

procedure

( git_pathspec_match_list_entrycountm)integer?

m:pathspec_match_list?
Get the number of items in a match list.

procedure

( git_pathspec_match_list_failed_entry m
pos)string?
m:pathspec_match_list?
pos:size_t
Get an original pathspec string that had no matches.

This will be return NULL for positions out of range.

procedure

( git_pathspec_match_list_failed_entrycountm)integer?

m:pathspec_match_list?
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.

procedure

( git_pathspec_match_list_freem)void?

m:pathspec_match_list?
Free memory associates with a git_pathspec_match_list

procedure

( git_pathspec_match_treetreeflagsps)pathspec_match_list?

tree:tree?
flags:git_pathspec_flag_t
ps:pathspec?
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.

procedure

( git_pathspec_match_workdirrepoflagsps)pathspec_match_list?

repo:repository?
flags:git_pathspec_flag_t
ps:pathspec?
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.

procedure

( git_pathspec_matches_pathpsflagspath)integer?

ps:pathspec?
flags:git_pathspec_flag_t
path:string?
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.

procedure

( git_pathspec_newpathspec)pathspec?

pathspec:strarray?
Compile a pathspec

top
up

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /