feat: add ability to compare objects (#54)

This commit is contained in:
Aleksey Kulikov 2022-05-10 16:18:55 +03:00 committed by GitHub
parent 5dfedadfe6
commit bad40bdb61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 466 additions and 137 deletions

View file

@ -1,9 +1,12 @@
import 'dart:ffi';
import 'package:equatable/equatable.dart';
import 'package:libgit2dart/libgit2dart.dart';
import 'package:libgit2dart/src/bindings/libgit2_bindings.dart';
import 'package:libgit2dart/src/bindings/remote.dart' as bindings;
import 'package:meta/meta.dart';
class Remote {
@immutable
class Remote extends Equatable {
/// Lookups remote with provided [name] in a [repo]sitory.
///
/// The [name] will be checked for validity.
@ -310,6 +313,9 @@ class Remote {
return 'Remote{name: $name, url: $url, pushUrl: $pushUrl, '
'refspecCount: $refspecCount}';
}
@override
List<Object?> get props => [name];
}
// coverage:ignore-start
@ -378,7 +384,8 @@ class RemoteCallback {
final String? fetch;
}
class RemoteReference {
@immutable
class RemoteReference extends Equatable {
const RemoteReference._({
required this.isLocal,
required this.localId,
@ -408,4 +415,7 @@ class RemoteReference {
return 'RemoteReference{isLocal: $isLocal, localId: $localId, '
'name: $name, oid: $oid, symRef: $symRef}';
}
@override
List<Object?> get props => [isLocal, localId, name, oid, symRef];
}