Skip to content

Commit 6d7f4bd

Browse files
committed
Fixes caching issue with file history
1 parent 0f4c591 commit 6d7f4bd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/git/gitService.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,12 +1410,16 @@ export class GitService implements Disposable {
14101410
if (options.ref !== undefined) {
14111411
key += `:${options.ref}`;
14121412
}
1413-
if (options.maxCount !== undefined) {
1413+
1414+
options.maxCount = options.maxCount == null ? Container.config.advanced.maxListItems || 0 : options.maxCount;
1415+
if (options.maxCount) {
14141416
key += `:n${options.maxCount}`;
14151417
}
1418+
14161419
if (options.renames) {
14171420
key += ':follow';
14181421
}
1422+
14191423
if (options.reverse) {
14201424
key += ':reverse';
14211425
}
@@ -1531,11 +1535,8 @@ export class GitService implements Disposable {
15311535
range = new Range(range.end, range.start);
15321536
}
15331537

1534-
const maxCount = options.maxCount == null ? Container.config.advanced.maxListItems || 0 : options.maxCount;
1535-
15361538
const data = await Git.log__file(root, file, ref, {
15371539
...options,
1538-
maxCount: maxCount,
15391540
startLine: range === undefined ? undefined : range.start.line + 1,
15401541
endLine: range === undefined ? undefined : range.end.line + 1
15411542
});
@@ -1546,7 +1547,7 @@ export class GitService implements Disposable {
15461547
file,
15471548
ref,
15481549
await this.getCurrentUser(root),
1549-
maxCount,
1550+
options.maxCount,
15501551
options.reverse!,
15511552
range
15521553
);

0 commit comments

Comments
 (0)