瀏覽代碼

Fixes caching issue with file history

main
Eric Amodio 5 年之前
父節點
當前提交
6d7f4bdab7
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. +6
    -5
      src/git/gitService.ts

+ 6
- 5
src/git/gitService.ts 查看文件

@ -1410,12 +1410,16 @@ export class GitService implements Disposable {
if (options.ref !== undefined) {
key += `:${options.ref}`;
}
if (options.maxCount !== undefined) {
options.maxCount = options.maxCount == null ? Container.config.advanced.maxListItems || 0 : options.maxCount;
if (options.maxCount) {
key += `:n${options.maxCount}`;
}
if (options.renames) {
key += ':follow';
}
if (options.reverse) {
key += ':reverse';
}
@ -1531,11 +1535,8 @@ export class GitService implements Disposable {
range = new Range(range.end, range.start);
}
const maxCount = options.maxCount == null ? Container.config.advanced.maxListItems || 0 : options.maxCount;
const data = await Git.log__file(root, file, ref, {
...options,
maxCount: maxCount,
startLine: range === undefined ? undefined : range.start.line + 1,
endLine: range === undefined ? undefined : range.end.line + 1
});
@ -1546,7 +1547,7 @@ export class GitService implements Disposable {
file,
ref,
await this.getCurrentUser(root),
maxCount,
options.maxCount,
options.reverse!,
range
);

Loading…
取消
儲存