GitCommandManager: add a function to get a file's contents at a specific revision

This commit is contained in:
Graham Christensen 2025-02-20 15:03:50 -05:00
parent 25575a12f3
commit bf28f8270d

View File

@ -278,6 +278,12 @@ export class GitCommandManager {
return output.stdout.trim() return output.stdout.trim()
} }
async showFileAtRef(ref: string, path: string): Promise<string> {
const args = ['show', `${ref}:${path}`]
const output = await this.exec(args)
return output.stdout.trim()
}
async stashPush(options?: string[]): Promise<boolean> { async stashPush(options?: string[]): Promise<boolean> {
const args = ['stash', 'push'] const args = ['stash', 'push']
if (options) { if (options) {