Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Execution

A set of configuration options that can be passed when executing a low-level Git command.

Hierarchy

  • Execution

Index

Properties

Optional Readonly env

env: Object

An optional collection of key-value pairs which will be set as environment variables before executing the Git process.

Optional Readonly expectedErrors

expectedErrors: readonly GitError[]

The Git errors which are expected by the caller. Unexpected errors will be logged and an error thrown.

Optional Readonly maxBuffer

maxBuffer: number

The size the output buffer to allocate to the spawned process. Set this if you are anticipating a large amount of output.

If not specified, this will be 10MB (10485760 bytes) which should be enough for most Git operations.

Optional Readonly name

name: string

The name for the command based on its caller's context. This could be used only for performance measurements and debugging. It has no runtime behavior effects.

Optional Readonly processCallback

processCallback: (process: ChildProcess) => void

An optional callback which will be invoked with the child process instance after spawning the Git process.

Note that if the stdin parameter was specified the stdin stream will be closed by the time this callback fires.

Defining this property could make the exec function invocation non-client compatible.

Type declaration

    • (process: ChildProcess): void
    • Parameters

      • process: ChildProcess

      Returns void

Optional Readonly stdin

stdin: string

An optional string which will be written to the child process stdin stream immediately after spawning the process.

Optional Readonly stdinEncoding

stdinEncoding: string

The encoding to use when writing to stdin, if the stdin parameter is a string.

Optional Readonly successExitCodes

successExitCodes: readonly number[]

The exit codes which indicate success to the caller. Unexpected exit codes will be logged and an error thrown. Defaults to 0 if undefined.