GitDirectoryRefStore class

Refs in a git directory: loose ref files over packed-refs.

An update takes git's own lock — <ref>.lock, created exclusively — so a second writer, this library or git, is refused rather than interleaved.

Inheritance

Constructors

GitDirectoryRefStore(String gitDir)

Properties

gitDir → String
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(String name) → Future<void>
Removes name; removing an absent ref changes nothing.
override
list([String prefix = 'refs/']) → Future<Map<String, GitObjectId>>
Every ref whose name starts with prefix.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String name) → Future<GitObjectId?>
The id name points at, or null when there is no such ref.
override
toString() → String
A string representation of this object.
inherited
write(String name, GitObjectId id, {GitObjectId? expected}) → Future<void>
Points name at id. With expected (use GitObjectId.zero for "must not exist yet") the update is refused with a GitRefConflict unless the ref is there now.
override

Operators

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