mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 12:49:08 -04:00
feat(revwalk): allow combining sorting types
This commit is contained in:
parent
da3bda077a
commit
f19a34a768
3 changed files with 10 additions and 8 deletions
|
@ -36,8 +36,10 @@ class RevWalk {
|
|||
/// Changing the sorting mode resets the walker.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
void sorting(GitSort sorting) =>
|
||||
bindings.sorting(_revWalkPointer, sorting.value);
|
||||
void sorting(List<GitSort> sorting) {
|
||||
final sort = sorting.fold(0, (previousValue, e) => e.value);
|
||||
bindings.sorting(_revWalkPointer, sort);
|
||||
}
|
||||
|
||||
/// Adds a new root for the traversal.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue