GitCommandManager: add a function to get a file's contents at a specific revision
This commit is contained in:
parent
25575a12f3
commit
bf28f8270d
@ -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) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user