Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src/git-command-manager.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/git-command-manager.ts')
-rw-r--r--src/git-command-manager.ts18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts
index 409a161..699a963 100644
--- a/src/git-command-manager.ts
+++ b/src/git-command-manager.ts
@@ -21,7 +21,8 @@ export interface IGitCommandManager {
config(
configKey: string,
configValue: string,
- globalConfig?: boolean
+ globalConfig?: boolean,
+ add?: boolean
): Promise<void>
configExists(configKey: string, globalConfig?: boolean): Promise<boolean>
fetch(refSpec: string[], fetchDepth?: number): Promise<void>
@@ -140,14 +141,15 @@ class GitCommandManager {
async config(
configKey: string,
configValue: string,
- globalConfig?: boolean
+ globalConfig?: boolean,
+ add?: boolean
): Promise<void> {
- await this.execGit([
- 'config',
- globalConfig ? '--global' : '--local',
- configKey,
- configValue
- ])
+ const args: string[] = ['config', globalConfig ? '--global' : '--local']
+ if (add) {
+ args.push('--add')
+ }
+ args.push(...[configKey, configValue])
+ await this.execGit(args)
}
async configExists(