-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix tests - use config when setting up repo & set creds before creati…
…ng default signature Signed-off-by: Kipras Melnikovas <[email protected]>
- Loading branch information
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,16 +26,11 @@ export async function testCase() { | |
|
||
const { | ||
repo, // | ||
config, | ||
sig, | ||
dir, | ||
} = await setupRepo(); | ||
|
||
const config: Git.Config = await repo.config(); | ||
|
||
await config.setBool(configKeys.autoApplyIfNeeded, Git.Config.MAP.FALSE); | ||
await config.setString("user.email", "[email protected]"); | ||
await config.setString("user.name", "tester"); | ||
|
||
const commitOidsInInitial: Git.Oid[] = []; | ||
const initialBranch: Git.Reference = await appendCommitsTo(commitOidsInInitial, 3, repo, sig); | ||
|
||
|
@@ -167,6 +162,12 @@ export async function setupRepo() { | |
const isBare = 0; | ||
const repo: Git.Repository = await Git.Repository.init(dir, isBare); | ||
|
||
const config: Git.Config = await repo.config(); | ||
|
||
await config.setBool(configKeys.autoApplyIfNeeded, Git.Config.MAP.FALSE); | ||
await config.setString("user.email", "[email protected]"); | ||
await config.setString("user.name", "tester"); | ||
|
||
const sig: Git.Signature = await Git.Signature.default(repo); | ||
log("sig %s", sig); | ||
|
||
|
@@ -178,6 +179,7 @@ export async function setupRepo() { | |
return { | ||
dir, | ||
repo, | ||
config, | ||
sig, | ||
initialCommit, | ||
} as const; | ||
|