From 6d7f4bdab7e968874e909cc30308553a8fcd2a30 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 10 Jun 2019 00:54:50 -0400 Subject: [PATCH] Fixes caching issue with file history --- src/git/gitService.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/git/gitService.ts b/src/git/gitService.ts index 4539308..7d42832 100644 --- a/src/git/gitService.ts +++ b/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 );