GitDirectorySnapshot class final Getting started

A capture of the plain files of a git directory.

The files are keyed by their path relative to the git directory, spelled with forward slashes whatever the platform: the segments are separated by /, none is empty, . or .., and a key has no leading / or \, no drive (C:) or UNC share (\\server) prefix, no backslash and no NUL character. Any other key makes the constructor throw an ArgumentError that names it. This keeps a capture to the files of the git directory, so it moves between machines and compares against any clone of the same shape. A capture holds every regular file the git directory contains at the moment it was taken; what a caller keeps from it — configuration, hooks, a fingerprint of the clone — is its own decision.

A capture contains the configuration and the hooks of the git directory. Restoring one therefore lets the snapshot's source choose code git will execute: restore only a snapshot from a trusted source, for example one this application captured itself.

Constructors

GitDirectorySnapshot(Map<String, Uint8List> files)
Creates a capture of files, keyed by git-directory relative path.

Properties

files → Map<String, Uint8List>
The captured files, keyed by git-directory relative path.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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