41 Revwalk
(require libgit2/include/revwalk) | package: libgit2 |
procedure
(git_revwalk_add_hide_cb walk hide_cb payload) → integer? walk : revwalk? hide_cb : git_revwalk_hide_cb payload : bytes?
procedure
(git_revwalk_free walk) → void?
walk : revwalk?
procedure
(git_revwalk_hide walk commit_id) → integer?
walk : revwalk? commit_id : oid?
The given id must belong to a committish on the walked repository.
The resolved commit and all its parents will be hidden from the output on the revision walk.
procedure
(git_revwalk_hide_glob walk glob) → integer?
walk : revwalk? glob : string?
The OIDs pointed 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 if not present as well as a trailing ’/*’ if the glob lacks ’?’, ’*’ or ’[’.
Any references matching this glob which do not point to a committish will be ignored.
procedure
(git_revwalk_hide_head walk) → integer?
walk : revwalk?
procedure
(git_revwalk_hide_ref walk refname) → integer?
walk : revwalk? refname : string?
The reference must point to a committish.
procedure
(git_revwalk_new repo) → revwalk?
repo : repository?
This revision walker uses a custom memory pool and an internal commit cache, so it is relatively expensive to allocate.
For maximum performance, this revision walker should be reused for different walks.
This revision walker is not thread safe: it may only be used to walk a repository on a single thread; however, it is possible to have several revision walkers in several different threads walking the same repository.
procedure
(git_revwalk_next walk) → (or/c oid? #f)
walk : revwalk?
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.
procedure
(git_revwalk_push walk id) → integer?
walk : revwalk? id : oid?
The pushed commit will be marked as one of the roots from which to start the walk. This commit may not be walked if it or a child is hidden.
At least one commit must be pushed onto the walker before a walk can be started.
The given id must belong to a committish on the walked repository.
procedure
(git_revwalk_push_glob walk glob) → integer?
walk : revwalk? glob : string?
The OIDs pointed to by the references that match the given glob pattern will be pushed to the revision walker.
A leading ’refs/’ is implied if not present as well as a trailing ’/*’ if the glob lacks ’?’, ’*’ or ’[’.
Any references matching this glob which do not point to a committish will be ignored.
procedure
(git_revwalk_push_head walk) → integer?
walk : revwalk?
procedure
(git_revwalk_push_range walk range) → integer?
walk : revwalk? range : string?
The range should be of the form .. where each is in the form accepted by ’git_revparse_single’. The left-hand commit will be hidden and the right-hand commit pushed.
procedure
(git_revwalk_push_ref walk refname) → integer?
walk : revwalk? refname : string?
The reference must point to a committish.
procedure
(git_revwalk_repository walk) → repository?
walk : revwalk?
procedure
(git_revwalk_reset walker) → void?
walker : revwalk?
This will clear all the pushed and hidden commits, and leave the walker in a blank state (just like at creation) ready to receive new commit pushes and start a new walk.
The revision walk is automatically reset when a walk is over.
procedure
(git_revwalk_simplify_first_parent walk) → void?
walk : revwalk?
No parents other than the first for each commit will be enqueued.
procedure
(git_revwalk_sorting walk sort_mode) → void?
walk : revwalk? sort_mode : git_sort/c
value
Changing the sorting mode resets the walker.