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>2020-03-02 11:33:30 -0500
committerGitHub <noreply@github.com>2020-03-02 11:33:30 -0500
commit684bbf983233d1341d533f6fe471109f385c631a (patch)
treeb1b1ad193814c44cf1e7b450c00c005ed96c0a6d /src/git-command-manager.ts
parentdee20e9b25075b7e4d2fc1569a2e99e21905e978 (diff)
more unit tests and corresponding refactoring (#174)
Diffstat (limited to 'src/git-command-manager.ts')
-rw-r--r--src/git-command-manager.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts
index 74489c2..2b0d054 100644
--- a/src/git-command-manager.ts
+++ b/src/git-command-manager.ts
@@ -26,6 +26,7 @@ export interface IGitCommandManager {
lfsInstall(): Promise<void>
log1(): Promise<void>
remoteAdd(remoteName: string, remoteUrl: string): Promise<void>
+ setEnvironmentVariable(name: string, value: string): void
tagExists(pattern: string): Promise<boolean>
tryClean(): Promise<boolean>
tryConfigUnset(configKey: string): Promise<boolean>
@@ -34,7 +35,7 @@ export interface IGitCommandManager {
tryReset(): Promise<boolean>
}
-export async function CreateCommandManager(
+export async function createCommandManager(
workingDirectory: string,
lfs: boolean
): Promise<IGitCommandManager> {
@@ -207,6 +208,10 @@ class GitCommandManager {
await this.execGit(['remote', 'add', remoteName, remoteUrl])
}
+ setEnvironmentVariable(name: string, value: string): void {
+ this.gitEnv[name] = value
+ }
+
async tagExists(pattern: string): Promise<boolean> {
const output = await this.execGit(['tag', '--list', pattern])
return !!output.stdout.trim()