ConfigOperations
Defined in: src/core/repo.ts:2978
Config operations (repository-level)
Wraps: git config subcommands
Methods
add()
add<
K>(key,value,opts?):Promise<void>
Defined in: src/core/repo.ts:3007
Add a value to a multi-valued config key
Wraps: git config --add <key> <value>
Type Parameters
K
K extends keyof ConfigSchema
Parameters
key
K
value
ConfigSchema[K]
opts?
Returns
Promise<void>
get()
get<
K>(key,opts?):Promise<ConfigSchema[K] |undefined>
Defined in: src/core/repo.ts:2986
Get a typed config value
Wraps: git config --get <key>
Type Parameters
K
K extends keyof ConfigSchema
Parameters
key
K
opts?
Returns
Promise<ConfigSchema[K] | undefined>
Config value or undefined if not set
getAll()
getAll<
K>(key,opts?):Promise<ConfigSchema[K][]>
Defined in: src/core/repo.ts:2993
Get all values for a multi-valued config key
Wraps: git config --get-all <key>
Type Parameters
K
K extends keyof ConfigSchema
Parameters
key
K
opts?
Returns
Promise<ConfigSchema[K][]>
getRaw()
getRaw(
key,opts?):Promise<string|string[] |undefined>
Defined in: src/core/repo.ts:3023
Get a raw config value (for arbitrary keys)
Wraps: git config --get <key>
Parameters
key
string
opts?
Returns
Promise<string | string[] | undefined>
Config value or undefined if not set
list()
list(
opts?):Promise<ConfigEntry[]>
Defined in: src/core/repo.ts:3044
List all config values
Wraps: git config --list
Parameters
opts?
Returns
Promise<ConfigEntry[]>
removeSection()
removeSection(
name,opts?):Promise<void>
Defined in: src/core/repo.ts:3058
Remove a config section
Wraps: git config --remove-section <name>
Parameters
name
string
opts?
Returns
Promise<void>
renameSection()
renameSection(
oldName,newName,opts?):Promise<void>
Defined in: src/core/repo.ts:3051
Rename a config section
Wraps: git config --rename-section <old> <new>
Parameters
oldName
string
newName
string
opts?
Returns
Promise<void>
set()
set<
K>(key,value,opts?):Promise<void>
Defined in: src/core/repo.ts:3000
Set a typed config value
Wraps: git config <key> <value>
Type Parameters
K
K extends keyof ConfigSchema
Parameters
key
K
value
ConfigSchema[K]
opts?
Returns
Promise<void>
setRaw()
setRaw(
key,value,opts?):Promise<void>
Defined in: src/core/repo.ts:3030
Set a raw config value (for arbitrary keys)
Wraps: git config <key> <value>
Parameters
key
string
value
string
opts?
Returns
Promise<void>
unset()
unset<
K>(key,opts?):Promise<void>
Defined in: src/core/repo.ts:3014
Unset a typed config value
Wraps: git config --unset <key>
Type Parameters
K
K extends keyof ConfigSchema
Parameters
key
K
opts?
Returns
Promise<void>
unsetRaw()
unsetRaw(
key,opts?):Promise<void>
Defined in: src/core/repo.ts:3037
Unset a raw config value (for arbitrary keys)
Wraps: git config --unset <key>
Parameters
key
string
opts?
Returns
Promise<void>