Skip to content

GitOpenOptions

GitOpenOptions = object

Defined in: src/core/types.ts:386

Options for opening a repository with environment isolation (§6.3)

Provides declarative environment configuration for Git operations.

Properties

credential?

optional credential: CredentialConfig

Defined in: src/core/types.ts:410

Credential configuration (§6.4)


credentialHelper?

optional credentialHelper: string

Defined in: src/core/types.ts:392

Custom credential helper


env?

optional env: Record<string, string>

Defined in: src/core/types.ts:394

Additional environment variables


home?

optional home: string

Defined in: src/core/types.ts:388

Custom HOME directory (~/.gitconfig source)


ignoreSystemConfig?

optional ignoreSystemConfig: boolean

Defined in: src/core/types.ts:390

Ignore system config (—config-env=GIT_CONFIG_GLOBAL=/dev/null equivalent)


inheritEnv?

optional inheritEnv: EnvInheritance

Defined in: src/core/types.ts:406

Controls how the parent process environment is inherited by spawned Git commands.

By default, only a curated allowlist of variables that Git needs to operate is inherited (environment variable traversal prevention). See EnvInheritance for all supported forms:

  • true — inherit the full parent environment.
  • string[] — inherit the default allowlist plus the named variables.
  • { add?, remove? } — adjust the default allowlist (e.g. drop SSH_AUTH_SOCK).
  • (name) => boolean — decide each variable individually.

lfs?

optional lfs: LfsMode

Defined in: src/core/types.ts:412

LFS mode configuration


pathPrefix?

optional pathPrefix: string[]

Defined in: src/core/types.ts:408

Directories to prepend to PATH