GitDir class
Represents a local directory
Properties
Methods
-
branches(
) → Future< List< BranchReference> > -
branchReference(
String branchName) → Future< BranchReference?> -
commitCount(
[String branchName = 'HEAD']) → Future< int> -
commitFromRevision(
String revision) → Future< Commit> -
revision
should probably be a sha1 to a commit. But GIT lets you do other things. See http://git-scm.com/docs/gitrevisions.html -
commits(
[String branchName = 'HEAD']) → Future< Map< String, Commit> > -
commitTree(
String treeSha, String commitMessage, {List< String> ? parentCommitShas}) → Future<String> -
Returns the
SHA1
for the new commit. -
createOrUpdateBranch(
String branchName, String treeSha, String commitMessage) → Future< String?> - Returns the SHA for the new commit if one is created.
-
currentBranch(
) → Future< BranchReference> -
isWorkingTreeClean(
) → Future< bool> -
lsTree(
String treeish, {bool subTreesOnly = false, String? path}) → Future< List< TreeEntry> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runCommand(
Iterable< String> args, {bool throwOnError = true, bool echoOutput = false}) → Future<ProcessResult> -
If
echoOutput
istrue
, the output of thegit
command will be echoed. Note:echoOutput
true
will also cause the returnedProcessResult
to havenull
values for ProcessResult.stdout and ProcessResult.stderr. -
showRef(
{bool heads = false, bool tags = false}) → Future< List< CommitReference> > -
toString(
) → String -
A string representation of this object.
inherited
-
updateBranch(
String branchName, Future< void> populater(Directory td), String commitMessage) → Future<Commit?> -
Updates the named branch with the content add by calling
populater
. -
updateBranchWithDirectoryContents(
String branchName, String sourceDirectoryPath, String commitMessage) → Future< Commit?> -
writeObjects(
List< String> paths) → Future<Map< String, String> > -
Given a list of
paths
, write those files to the object store and return aMap
where the key is the input path and the value is the SHA of the newly written object.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromExisting(
String gitDirRoot, {bool allowSubdirectory = false}) → Future< GitDir> -
If
allowSubdirectory
is true, aGitDir
may be returned ifgitDirRoot
is a subdirectory within a Git repository. -
init(
String path, {bool allowContent = false, String? initialBranch}) → Future< GitDir> -
allowContent
iftrue
, doesn't check to see if the directory is empty -
isGitDir(
String path) → Future< bool>