Skip to content

Commit a5a77f1

Browse files
committed
Changes authors filtering to allow multiple authors
1 parent 99bf1c5 commit a5a77f1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/git/git.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,10 @@ export class Git {
592592
return git<string>({ cwd: repoPath }, ...params);
593593
}
594594

595-
static log(repoPath: string, options: { author?: string; maxCount?: number; ref?: string; reverse?: boolean }) {
595+
static log(repoPath: string, options: { authors?: string[]; maxCount?: number; ref?: string; reverse?: boolean }) {
596596
const params = [...defaultLogParams, '--full-history', '-M', '-m'];
597-
if (options.author) {
598-
params.push(`--author=${options.author}`);
597+
if (options.authors) {
598+
params.push(...options.authors.map(a => `--author=${a}`));
599599
}
600600
if (options.maxCount && !options.reverse) {
601601
params.push(`-n${options.maxCount}`);

src/git/gitService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,13 +1321,13 @@ export class GitService implements Disposable {
13211321
@log()
13221322
async getLog(
13231323
repoPath: string,
1324-
options: { author?: string; maxCount?: number; ref?: string; reverse?: boolean } = {}
1324+
options: { authors?: string[]; maxCount?: number; ref?: string; reverse?: boolean } = {}
13251325
): Promise<GitLog | undefined> {
13261326
const maxCount = options.maxCount == null ? Container.config.advanced.maxListItems || 0 : options.maxCount;
13271327

13281328
try {
13291329
const data = await Git.log(repoPath, {
1330-
author: options.author,
1330+
authors: options.authors,
13311331
maxCount: maxCount,
13321332
ref: options.ref,
13331333
reverse: options.reverse

0 commit comments

Comments
 (0)