mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor: change naming of local variable to reflect intent
This commit is contained in:
parent
5f7fdf4bd3
commit
9686d93935
3 changed files with 13 additions and 13 deletions
|
@ -337,9 +337,9 @@ class DiffLine {
|
||||||
GitDiffLine get origin {
|
GitDiffLine get origin {
|
||||||
final originInt = _diffLinePointer.ref.origin;
|
final originInt = _diffLinePointer.ref.origin;
|
||||||
late final GitDiffLine result;
|
late final GitDiffLine result;
|
||||||
for (var flag in GitDiffLine.values) {
|
for (var type in GitDiffLine.values) {
|
||||||
if (originInt == flag.value) {
|
if (originInt == type.value) {
|
||||||
result = flag;
|
result = type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -7,9 +7,9 @@ class Features {
|
||||||
var result = <GitFeature>[];
|
var result = <GitFeature>[];
|
||||||
final featuresInt = libgit2.git_libgit2_features();
|
final featuresInt = libgit2.git_libgit2_features();
|
||||||
|
|
||||||
for (var flag in GitFeature.values) {
|
for (var feature in GitFeature.values) {
|
||||||
if (featuresInt & flag.value == flag.value) {
|
if (featuresInt & feature.value == feature.value) {
|
||||||
result.add(flag);
|
result.add(feature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -274,7 +274,7 @@ class Repository {
|
||||||
GitRepositoryState get state {
|
GitRepositoryState get state {
|
||||||
final stateInt = bindings.state(_repoPointer);
|
final stateInt = bindings.state(_repoPointer);
|
||||||
return GitRepositoryState.values
|
return GitRepositoryState.values
|
||||||
.singleWhere((flag) => stateInt == flag.value);
|
.singleWhere((state) => stateInt == state.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Removes all the metadata associated with an ongoing command like
|
/// Removes all the metadata associated with an ongoing command like
|
||||||
|
@ -560,9 +560,9 @@ class Repository {
|
||||||
var statuses = <GitStatus>{};
|
var statuses = <GitStatus>{};
|
||||||
// Skipping GitStatus.current because entry that is in the list can't be without changes
|
// 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
|
// but `&` on `0` value falsly adds it to the set of flags
|
||||||
for (var flag in GitStatus.values.skip(1)) {
|
for (var status in GitStatus.values.skip(1)) {
|
||||||
if (entry.ref.status & flag.value == flag.value) {
|
if (entry.ref.status & status.value == status.value) {
|
||||||
statuses.add(flag);
|
statuses.add(status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result[path] = statuses;
|
result[path] = statuses;
|
||||||
|
@ -592,9 +592,9 @@ class Repository {
|
||||||
statuses.add(GitStatus.current);
|
statuses.add(GitStatus.current);
|
||||||
} else {
|
} else {
|
||||||
// Skipping GitStatus.current because `&` on `0` value falsly adds it to the set of flags
|
// Skipping GitStatus.current because `&` on `0` value falsly adds it to the set of flags
|
||||||
for (var flag in GitStatus.values.skip(1)) {
|
for (var status in GitStatus.values.skip(1)) {
|
||||||
if (statusInt & flag.value == flag.value) {
|
if (statusInt & status.value == status.value) {
|
||||||
statuses.add(flag);
|
statuses.add(status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue