mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 12:49:08 -04:00
refactor!: return sets of git type flags instead of integers
This commit is contained in:
parent
050c0eb57a
commit
7618f944c0
12 changed files with 459 additions and 191 deletions
|
@ -36,8 +36,11 @@ class RevWalk {
|
|||
/// Changing the sorting mode resets the walker.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
void sorting(List<GitSort> sorting) {
|
||||
final sort = sorting.fold(0, (previousValue, e) => e.value);
|
||||
void sorting(Set<GitSort> sorting) {
|
||||
final int sort = sorting.fold(
|
||||
0,
|
||||
(previousValue, e) => previousValue | e.value,
|
||||
);
|
||||
bindings.sorting(_revWalkPointer, sort);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue