mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-11 15:22:16 -04:00
Compare commits
No commits in common. "16c42b9b2d7f8d6327272e837838a7c5d815f57a" and "bad40bdb6192eb901e51cba0d161cc03eb608019" have entirely different histories.
16c42b9b2d
...
bad40bdb61
3 changed files with 3 additions and 17 deletions
|
@ -1,8 +1,8 @@
|
||||||
import 'dart:ffi';
|
import 'dart:ffi';
|
||||||
|
|
||||||
import 'package:equatable/equatable.dart';
|
|
||||||
import 'package:ffi/ffi.dart';
|
import 'package:ffi/ffi.dart';
|
||||||
import 'package:libgit2dart/libgit2dart.dart';
|
import 'package:libgit2dart/libgit2dart.dart';
|
||||||
|
|
||||||
import 'package:libgit2dart/src/bindings/attr.dart' as attr_bindings;
|
import 'package:libgit2dart/src/bindings/attr.dart' as attr_bindings;
|
||||||
import 'package:libgit2dart/src/bindings/describe.dart' as describe_bindings;
|
import 'package:libgit2dart/src/bindings/describe.dart' as describe_bindings;
|
||||||
import 'package:libgit2dart/src/bindings/graph.dart' as graph_bindings;
|
import 'package:libgit2dart/src/bindings/graph.dart' as graph_bindings;
|
||||||
|
@ -12,10 +12,8 @@ import 'package:libgit2dart/src/bindings/repository.dart' as bindings;
|
||||||
import 'package:libgit2dart/src/bindings/reset.dart' as reset_bindings;
|
import 'package:libgit2dart/src/bindings/reset.dart' as reset_bindings;
|
||||||
import 'package:libgit2dart/src/bindings/status.dart' as status_bindings;
|
import 'package:libgit2dart/src/bindings/status.dart' as status_bindings;
|
||||||
import 'package:libgit2dart/src/util.dart';
|
import 'package:libgit2dart/src/util.dart';
|
||||||
import 'package:meta/meta.dart';
|
|
||||||
|
|
||||||
@immutable
|
class Repository {
|
||||||
class Repository extends Equatable {
|
|
||||||
/// Initializes a new instance of the [Repository] class from provided
|
/// Initializes a new instance of the [Repository] class from provided
|
||||||
/// pointer to repository object in memory.
|
/// pointer to repository object in memory.
|
||||||
///
|
///
|
||||||
|
@ -743,9 +741,6 @@ class Repository extends Equatable {
|
||||||
|
|
||||||
return packbuilder.writtenLength;
|
return packbuilder.writtenLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
List<Object?> get props => [path];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// coverage:ignore-start
|
// coverage:ignore-start
|
||||||
|
@ -826,14 +821,10 @@ class RepositoryCallback {
|
||||||
final String? originUrl;
|
final String? originUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@immutable
|
class Identity {
|
||||||
class Identity extends Equatable {
|
|
||||||
/// Identity to use for reflogs.
|
/// Identity to use for reflogs.
|
||||||
const Identity({required this.name, required this.email});
|
const Identity({required this.name, required this.email});
|
||||||
|
|
||||||
final String name;
|
final String name;
|
||||||
final String email;
|
final String email;
|
||||||
|
|
||||||
@override
|
|
||||||
List<Object?> get props => [name, email];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,6 @@ void main() {
|
||||||
final identity = repo.identity;
|
final identity = repo.identity;
|
||||||
expect(identity.name, 'name');
|
expect(identity.name, 'name');
|
||||||
expect(identity.email, 'email@email.com');
|
expect(identity.email, 'email@email.com');
|
||||||
expect(identity, equals(repo.identity));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('unsets identity', () {
|
test('unsets identity', () {
|
||||||
|
|
|
@ -249,9 +249,5 @@ void main() {
|
||||||
test('returns string representation of Repository object', () {
|
test('returns string representation of Repository object', () {
|
||||||
expect(repo.toString(), contains('Repository{'));
|
expect(repo.toString(), contains('Repository{'));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('supports value comparison', () {
|
|
||||||
expect(repo, equals(Repository.open(tmpDir.path)));
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue