Git-Raw
view release on metacpan or search on metacpan
deps/libgit2/include/git2/revwalk.h view on Meta::CPAN
* @param walk the walker being used for the traversal
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_hide_head(git_revwalk *walk);
/**
* Push the OID pointed to by a reference
*
* The reference must point to a committish.
*
* @param walk the walker being used for the traversal
* @param refname the reference to push
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_push_ref(git_revwalk *walk, const char *refname);
/**
* Hide the OID pointed to by a reference
*
* The reference must point to a committish.
*
* @param walk the walker being used for the traversal
* @param refname the reference to hide
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_hide_ref(git_revwalk *walk, const char *refname);
/**
* Get the next commit from the revision walk.
*
* The initial call to this method is *not* blocking when
* iterating through a repo with a time-sorting mode.
*
* Iterating with Topological or inverted modes makes the initial
* call blocking to preprocess the commit list, but this block should be
* mostly unnoticeable on most repositories (topological preprocessing
* times at 0.3s on the git.git repo).
*
* The revision walker is reset when the walk is over.
*
* @param out Pointer where to store the oid of the next commit
* @param walk the walker to pop the commit from.
* @return 0 if the next commit was found;
* GIT_ITEROVER if there are no commits left to iterate
*/
GIT_EXTERN(int) git_revwalk_next(git_oid *out, git_revwalk *walk);
/**
* Change the sorting mode when iterating through the
* repository's contents.
*
* Changing the sorting mode resets the walker.
*
* @param walk the walker being used for the traversal.
* @param sort_mode combination of GIT_SORT_XXX flags
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_sorting(git_revwalk *walk, unsigned int sort_mode);
/**
* Push and hide the respective endpoints of the given range.
*
* The range should be of the form
* <commit>..<commit>
* where each <commit> is in the form accepted by 'git_revparse_single'.
* The left-hand commit will be hidden and the right-hand commit pushed.
*
* @param walk the walker being used for the traversal
* @param range the range
* @return 0 or an error code
*
*/
GIT_EXTERN(int) git_revwalk_push_range(git_revwalk *walk, const char *range);
/**
* Simplify the history by first-parent
*
* No parents other than the first for each commit will be enqueued.
*
* @param walk The revision walker.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_simplify_first_parent(git_revwalk *walk);
/**
* Free a revision walker previously allocated.
*
* @param walk traversal handle to close. If NULL nothing occurs.
*/
GIT_EXTERN(void) git_revwalk_free(git_revwalk *walk);
/**
* Return the repository on which this walker
* is operating.
*
* @param walk the revision walker
* @return the repository being walked
*/
GIT_EXTERN(git_repository *) git_revwalk_repository(git_revwalk *walk);
/**
* This is a callback function that user can provide to hide a
* commit and its parents. If the callback function returns non-zero value,
* then this commit and its parents will be hidden.
*
* @param commit_id oid of Commit
* @param payload User-specified pointer to data to be passed as data payload
* @return non-zero to hide the commmit and it parent.
*/
typedef int GIT_CALLBACK(git_revwalk_hide_cb)(
const git_oid *commit_id,
void *payload);
/**
* Adds, changes or removes a callback function to hide a commit and its parents
*
* @param walk the revision walker
* @param hide_cb callback function to hide a commit and its parents
* @param payload data payload to be passed to callback function
* @return 0 or an error code.
( run in 2.205 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )