Git class final

Runs git for the project cache.

Commits use dpk's own identity with signing and hooks turned off, so a machine without user.name, with commit.gpgsign, or with a global pre-commit hook still records the baseline. Line endings are never converted.

Constructors

Git(ProcessRunner processRunner)

Properties

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

Methods

call(List<String> arguments, {required String directory, bool check = true}) → Future<ProcessResult>
Runs git <arguments> in directory. Throws a DpkException when git fails, unless check is false.
commit(String message, {required String directory}) → Future<void>
Commits everything staged, even when nothing is.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
output(List<String> arguments, {required String directory}) → Future<String>
Runs git and returns its standard output.
succeeds(List<String> arguments, {required String directory}) → Future<bool>
Whether git <arguments> exits with 0.
toString() → String
A string representation of this object.
inherited

Operators

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