diff --git a/lib/src/diff.dart b/lib/src/diff.dart index e3fcbf4..61292ee 100644 --- a/lib/src/diff.dart +++ b/lib/src/diff.dart @@ -337,9 +337,9 @@ class DiffLine { GitDiffLine get origin { final originInt = _diffLinePointer.ref.origin; late final GitDiffLine result; - for (var flag in GitDiffLine.values) { - if (originInt == flag.value) { - result = flag; + for (var type in GitDiffLine.values) { + if (originInt == type.value) { + result = type; } } return result; diff --git a/lib/src/features.dart b/lib/src/features.dart index 65051ac..bcdb9d6 100644 --- a/lib/src/features.dart +++ b/lib/src/features.dart @@ -7,9 +7,9 @@ class Features { var result = []; final featuresInt = libgit2.git_libgit2_features(); - for (var flag in GitFeature.values) { - if (featuresInt & flag.value == flag.value) { - result.add(flag); + for (var feature in GitFeature.values) { + if (featuresInt & feature.value == feature.value) { + result.add(feature); } } diff --git a/lib/src/repository.dart b/lib/src/repository.dart index 941d918..cca4663 100644 --- a/lib/src/repository.dart +++ b/lib/src/repository.dart @@ -274,7 +274,7 @@ class Repository { GitRepositoryState get state { final stateInt = bindings.state(_repoPointer); return GitRepositoryState.values - .singleWhere((flag) => stateInt == flag.value); + .singleWhere((state) => stateInt == state.value); } /// Removes all the metadata associated with an ongoing command like @@ -560,9 +560,9 @@ class Repository { var statuses = {}; // Skipping GitStatus.current because entry that is in the list can't be without changes // but `&` on `0` value falsly adds it to the set of flags - for (var flag in GitStatus.values.skip(1)) { - if (entry.ref.status & flag.value == flag.value) { - statuses.add(flag); + for (var status in GitStatus.values.skip(1)) { + if (entry.ref.status & status.value == status.value) { + statuses.add(status); } } result[path] = statuses; @@ -592,9 +592,9 @@ class Repository { statuses.add(GitStatus.current); } else { // Skipping GitStatus.current because `&` on `0` value falsly adds it to the set of flags - for (var flag in GitStatus.values.skip(1)) { - if (statusInt & flag.value == flag.value) { - statuses.add(flag); + for (var status in GitStatus.values.skip(1)) { + if (statusInt & status.value == status.value) { + statuses.add(status); } } }