浏览代码

Fixes truncation detection with dupes

main
Eric Amodio 6 年前
父节点
当前提交
2c32a4b0c6
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. +7
    -1
      src/git/parsers/logParser.ts

+ 7
- 1
src/git/parsers/logParser.ts 查看文件

@ -61,6 +61,7 @@ export class GitLogParser {
const authors: Map<string, GitAuthor> = new Map();
const commits: Map<string, GitLogCommit> = new Map();
let truncationCount = maxCount;
while (true) {
next = lines.next();
@ -207,6 +208,11 @@ export class GitLogParser {
if (commit === undefined) {
i++;
}
else if (truncationCount) {
// Since this matches an existing commit it will be skipped, so reduce our truncationCount to ensure accurate truncation detection
truncationCount--;
}
recentCommit = GitLogParser.parseEntry(
entry,
commit,
@ -231,7 +237,7 @@ export class GitLogParser {
count: i,
maxCount: maxCount,
range: range,
truncated: Boolean(maxCount && i >= maxCount && maxCount !== 1)
truncated: Boolean(truncationCount && i >= truncationCount && truncationCount !== 1)
} as GitLog;
}

正在加载...
取消
保存