GitService class

Mixed-in types

Constructors

GitService({String? remoteName, String? remoteUrl, String? workingDirectory})
const

Properties

debug → bool
no setter
gitDiffArgs → List<String>
no setter
gitDir → String
no setter
hashCode → int
The hash code for this object.
no setterinherited
remoteName → String?
final
remoteUrl → String?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
workingDirectory → String?
Directory to run git in.
final

Methods

add(List<String> filePaths) → Future<void>
applyModifications(List<String> existing) → Future<void>
createBackup() → Future<String?>
Snapshots the index and working tree without modifying either.
deletedFiles() → Future<List<String>>
diffFiles({required List<String> diffArgs, required String diffFilters}) → Future<List<String>>
dropBackup() → Future<void>
Deletes backupRef, letting git gc reclaim the snapshot.
getCurrentBranch() → Future<String>
hasAtLeastOneCommit() → Future<bool>
inherited
isGitInstalled() → Future<bool>
inherited
isGitRepository() → Future<bool>
inherited
nonStagedFiles() → Future<List<String>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
partiallyStagedFiles() → Future<List<String>>
prepareFiles() → Future<GitContext>
processRenames(List<String> filePaths, {bool includeRenameFrom = true}) → List<String>
From list of files, split renames and flatten into two files toNULfrom.
restoreBackup(String sha) → Future<bool>
Restores the index and working tree to the sha snapshot.
setHooksDir() → Future<bool>
Points Git at the managed shim directory (hooks/_), husky-style.
stagedFiles() → Future<List<String>>
toString() → String
A string representation of this object.
inherited
unsetHooksDir() → Future<bool>
Unsets core.hooksPath so Git falls back to .git/hooks.

Operators

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

Constants

backupRef → const String
Ref that anchors the snapshot created by createBackup.