fix: use showFileAtRefBase64 to read per-commit file contents (#3744)
* GitCommandManager: add a function to get a file's contents at a specific revision * use showFileAtRef instead of readFileBase64 * Teach GitCommandManager.exec about an object of exec parameters so we can add more * Encode the showFiletRef output as base64 out of the gate * Fix missing async for function * Use Buffer.concat to avoid issues with partial data streams * formatting --------- Co-authored-by: gustavderdrache <alex.ford@determinate.systems>
This commit is contained in:
committed by
GitHub
parent
367180cbdf
commit
dd2324fc52
@@ -19,7 +19,7 @@ export async function getWorkingBaseAndType(
|
||||
): Promise<[string, WorkingBaseType]> {
|
||||
const symbolicRefResult = await git.exec(
|
||||
['symbolic-ref', 'HEAD', '--short'],
|
||||
true
|
||||
{allowAllExitCodes: true}
|
||||
)
|
||||
if (symbolicRefResult.exitCode == 0) {
|
||||
// A ref is checked out
|
||||
@@ -200,7 +200,7 @@ export async function createOrUpdateBranch(
|
||||
} else {
|
||||
aopts.push('-A')
|
||||
}
|
||||
await git.exec(aopts, true)
|
||||
await git.exec(aopts, {allowAllExitCodes: true})
|
||||
const popts = ['-m', commitMessage]
|
||||
if (signoff) {
|
||||
popts.push('--signoff')
|
||||
|
Reference in New Issue
Block a user