GitCliTool class final
Constructors
- GitCliTool.new({String executable = "git", int? windowsCodePage = WindowsCodePage.utf8})
Properties
- executable ↔ String
-
The executable that is used whenever this CliTool starts a io.Process.
latefinalinherited
-
extraEnvironment
↔ Map<
String, String> ? -
Some extra environment variables that will used whenever a process is
started by this CliTool.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- originalExecutable → String
-
This is the original executable that was passed to the constructor
of this CliTool.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- website → Uri?
-
A link to the official website of this tool.
no setterinherited
- windowsCodePage → int?
-
The code page that should be used when executing this CliTool
on windows.
finalinherited
Methods
-
checkExistsSync(
) → void -
Check if executable exists, as per existsSync.
inherited
-
consumeProcess(
List< String> args, {String? workingDirectory, CliStreamConsumer consumer = const CliStreamConsumer(), Map<String, String> ? environment, bool includeParentEnvironment = true, bool includeExtraEnvironment = true}) → Future<int> -
Start a new process and consume it using
consumer
.inherited -
evaluateProcess(
List< String> args, {String? workingDirectory, CliStreamConsumer consumer = const CliStreamConsumer(), Map<String, String> ? environment, bool includeParentEnvironment = true, bool includeExtraEnvironment = true, int expectedCode = 0}) → Future<bool> -
Start a process in
workingDirectory
.inherited -
existsSync(
) → bool -
Synchronously check if executable can be found and executed without any
errors.
override
-
getCommitShas(
{required String gitDirpath, Map< String, String> ? environment, bool includeParentEnvironment = true}) → Future<List< String> > -
Get a chronologically sorted list of all commits in the
git repository at
gitDirpath
. -
getCommitShasForFile(
{required String gitDirpath, required String relativeFilepath, bool followName = true, Map< String, String> ? environment, bool includeParentEnvironment = true}) → Future<List< String> > -
Get a chronologically sorted list of all commits from the file
at
relativeFilepath
in the git repository atgitDirpath
. -
getCurrentCommitSha(
{required String gitDirpath, Map< String, String> ? environment, bool includeParentEnvironment = true}) → Future<String> -
Get the commit the directory at
gitDirpath
is at. -
getRemoteUrl(
{required String gitDirpath, required String remote, Map< String, String> ? environment, bool includeParentEnvironment = true}) → Future<Uri> -
getVersionSync(
) → Version -
Returns the version of executable.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pull(
{required String gitDir, required String remote, required String branch, Map< String, String> ? environment, bool includeParentEnvironment = true}) → Future<void> -
runAsync(
List< String> args, {String? workingDirectory, Encoding encoding = defaultCliEncoding, Map<String, String> ? environment, bool includeParentEnvironment = true, bool includeExtraEnvironment = true}) → Future<ProcessResult> -
inherited
-
runSync(
List< String> args, {String? workingDirectory, Encoding encoding = defaultCliEncoding, Map<String, String> ? environment, bool includeParentEnvironment = true, bool includeExtraEnvironment = true}) → ProcessResult -
inherited
-
startProcess(
List< String> args, {String? workingDirectory, ProcessStartMode mode = io.ProcessStartMode.normal, Map<String, String> ? environment, bool includeParentEnvironment = true, bool includeExtraEnvironment = true}) → Future<Process> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateSubmodules(
String gitDir, {bool init = true, bool recursive = false, Map< String, String> ? environment, bool includeParentEnvironment = true}) → Future<void>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited