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>2019-12-12 13:49:26 -0500
committerGitHub <noreply@github.com>2019-12-12 13:49:26 -0500
commitca3a763d5ed9e04331c8a6aea85ddabcb3a6aa4d (patch)
tree236058d4a2be4208412dc3ed294e2db566aab7d6 /src/git-command-manager.ts
parent25ac60e43ded675f082e10f444b0ad95ea43622e (diff)
add input persist-credentials (#107)
Diffstat (limited to 'src/git-command-manager.ts')
-rw-r--r--src/git-command-manager.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts
index ddd5ec6..f86b8c0 100644
--- a/src/git-command-manager.ts
+++ b/src/git-command-manager.ts
@@ -116,7 +116,7 @@ class GitCommandManager {
}
async config(configKey: string, configValue: string): Promise<void> {
- await this.execGit(['config', configKey, configValue])
+ await this.execGit(['config', '--local', configKey, configValue])
}
async configExists(configKey: string): Promise<boolean> {
@@ -124,7 +124,7 @@ class GitCommandManager {
return `\\${x}`
})
const output = await this.execGit(
- ['config', '--name-only', '--get-regexp', pattern],
+ ['config', '--local', '--name-only', '--get-regexp', pattern],
true
)
return output.exitCode === 0
@@ -211,20 +211,23 @@ class GitCommandManager {
async tryConfigUnset(configKey: string): Promise<boolean> {
const output = await this.execGit(
- ['config', '--unset-all', configKey],
+ ['config', '--local', '--unset-all', configKey],
true
)
return output.exitCode === 0
}
async tryDisableAutomaticGarbageCollection(): Promise<boolean> {
- const output = await this.execGit(['config', 'gc.auto', '0'], true)
+ const output = await this.execGit(
+ ['config', '--local', 'gc.auto', '0'],
+ true
+ )
return output.exitCode === 0
}
async tryGetFetchUrl(): Promise<string> {
const output = await this.execGit(
- ['config', '--get', 'remote.origin.url'],
+ ['config', '--local', '--get', 'remote.origin.url'],
true
)