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:
authoreric sciple <ericsciple@users.noreply.github.com>2021-11-01 11:43:18 -0500
committerGitHub <noreply@github.com>2021-11-01 11:43:18 -0500
commit0fc042ca35b9ee6d4c6dc650662d40f189018a49 (patch)
treeb357edb1a8f6da9760e4dc15a179d0db27d9bcaa /src/git-command-manager.ts
parentd7a4963ed25cda3df63783c22befd89dcbc4508d (diff)
set insteadOf url for org-id (#621)v2.4.0
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(