diff options
| author | Vicent Martà <tanoku@gmail.com> | 2012-02-27 14:03:20 -0800 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2012-02-27 14:03:20 -0800 |
| commit | 17b3d9b92b9132be116e4ecfae736de025c5158f (patch) | |
| tree | 614eaf15e8974b2c594271fabb379c6446e8a235 /include | |
| parent | e07c2d225deec42e592133df49ad8c564d4d66c7 (diff) | |
| parent | a4a910dd9c485989cecdf8af19750a11f0d2653d (diff) | |
| download | libgit2-17b3d9b92b9132be116e4ecfae736de025c5158f.tar.gz | |
Merge pull request #576 from carlosmn/revwalk
Friendlier revision walking
Diffstat (limited to 'include')
| -rw-r--r-- | include/git2/revwalk.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/git2/revwalk.h b/include/git2/revwalk.h index 1af0e4291..e7ec2abf3 100644 --- a/include/git2/revwalk.h +++ b/include/git2/revwalk.h @@ -101,6 +101,28 @@ GIT_EXTERN(void) git_revwalk_reset(git_revwalk *walker); */ GIT_EXTERN(int) git_revwalk_push(git_revwalk *walk, const git_oid *oid); +/** + * Push matching references + * + * The OIDs pinted to by the references that match the given glob + * pattern will be pushed to the revision walker. + * + * A leading 'refs/' is implied it not present as well as a trailing + * '/ *' if the glob lacks '?', '*' or '['. + * + * @param walk the walker being used for the traversal + * @param glob the glob pattern references should match + * @return GIT_SUCCESS or an error code + */ +GIT_EXTERN(int) git_revwalk_push_glob(git_revwalk *walk, const char *glob); + +/** + * Push the repository's HEAD + * + * @param walk the walker being used for the traversal + * @return GIT_SUCCESS or an error code + */ +GIT_EXTERN(int) git_revwalk_push_head(git_revwalk *walk); /** * Mark a commit (and its ancestors) uninteresting for the output. @@ -118,6 +140,30 @@ GIT_EXTERN(int) git_revwalk_push(git_revwalk *walk, const git_oid *oid); GIT_EXTERN(int) git_revwalk_hide(git_revwalk *walk, const git_oid *oid); /** + * Hide matching references. + * + * The OIDs pinted to by the references that match the given glob + * pattern and their ancestors will be hidden from the output on the + * revision walk. + * + * A leading 'refs/' is implied it not present as well as a trailing + * '/ *' if the glob lacks '?', '*' or '['. + * + * @param walk the walker being used for the traversal + * @param glob the glob pattern references should match + * @return GIT_SUCCESS or an error code + */ +GIT_EXTERN(int) git_revwalk_hide_glob(git_revwalk *walk, const char *glob); + +/** + * Hide the repository's HEAD + * + * @param walk the walker being used for the traversal + * @return GIT_SUCCESS or an error code + */ +GIT_EXTERN(int) git_revwalk_hide_head(git_revwalk *walk); + +/** * Get the next commit from the revision walk. * * The initial call to this method is *not* blocking when |
