ConfigOperations
Defined in: src/core/repo.ts:2946
Config operations (repository-level)
Wraps: git config subcommands
Methods
add()
add<
K>(key,value,opts?):Promise<void>
Defined in: src/core/repo.ts:2975
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:2954
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:2961
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:2991
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:3012
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:3026
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:3019
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:2968
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:2998
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:2982
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:3005
Unset a raw config value (for arbitrary keys)
Wraps: git config --unset <key>
Parameters
key
string
opts?
Returns
Promise<void>