feat(revwalk): allow combining sorting types

This commit is contained in:
Aleksey Kulikov 2021-09-03 18:54:13 +03:00
parent da3bda077a
commit f19a34a768
3 changed files with 10 additions and 8 deletions

View file

@ -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.
///