Add path to LogOptions (#97693)

Part of microsoft/vscode-pull-request-github#1781
This commit is contained in:
Alex Ross
2020-05-13 16:04:28 +02:00
committed by GitHub
parent 640b3d10fe
commit 3da22e920b
2 changed files with 4 additions and 0 deletions

View File

@@ -848,6 +848,9 @@ export class Repository {
async log(options?: LogOptions): Promise<Commit[]> {
const maxEntries = options?.maxEntries ?? 32;
const args = ['log', `-n${maxEntries}`, `--format=${COMMIT_FORMAT}`, '-z', '--'];
if (options?.path) {
args.push(options.path);
}
const result = await this.run(args);
if (result.exitCode) {