Skip to content

Commit

Permalink
Fixes caching issue with file history
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Jun 11, 2019
1 parent 0f4c591 commit 6d7f4bd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/git/gitService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down Expand Up @@ -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
});
Expand All @@ -1546,7 +1547,7 @@ export class GitService implements Disposable {
file,
ref,
await this.getCurrentUser(root),
maxCount,
options.maxCount,
options.reverse!,
range
);
Expand Down

0 comments on commit 6d7f4bd

Please sign in to comment.