GitMemoryServer class

An in-memory git server.

Constructors

GitMemoryServer({bool protocolV2 = true, String defaultBranch = 'main', String? requiredPassword, Uri? url})

Properties

beforePush ↔ Future<void> Function()?
Called before a push is applied: a test moves a branch here to lose a client's race deterministically.
getter/setter pair
client → Client
The client to give a GitHttpRemote.
no setter
defaultBranch → String
What HEAD points at.
final
hashCode → int
The hash code for this object.
no setterinherited
protocolV2 → bool
Whether fetching speaks protocol version 2 when the client asks.
final
repository → GitRepository
The hosted repository. Refs under refs/heads/ are its branches.
final
requests → Map<String, int>
Requests answered, by kind — ls-refs, fetch, push.
final
requiredPassword → String?
When set, every request must carry Basic credentials with this password.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
url → Uri
Where the repository is served; other paths answer 404.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
seed(Map<String, List<int>> files, {String? branch, String message = 'seed'}) → Future<GitObjectId>
Makes a commit of files on branch directly on the server.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited