mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-16 01:25:42 -05:00
Fixes issues with diff with previous
Wouldn't always grab the correct commit
This commit is contained in:
@@ -441,7 +441,7 @@ export default class GitProvider extends Disposable {
|
||||
Logger.log(`getLogForFile('${fileName}', ${sha}, ${repoPath}, ${range && `[${range.start.line}, ${range.end.line}]`}, ${maxCount})`);
|
||||
fileName = Git.normalizePath(fileName);
|
||||
|
||||
const useCaching = this.UseGitCaching && !range && !maxCount;
|
||||
const useCaching = this.UseGitCaching && !sha && !range && !maxCount;
|
||||
|
||||
let cacheKey: string;
|
||||
let entry: GitCacheEntry;
|
||||
@@ -464,7 +464,7 @@ export default class GitProvider extends Disposable {
|
||||
return (range
|
||||
? Git.logRange(fileName, range.start.line + 1, range.end.line + 1, sha, repoPath, maxCount)
|
||||
: Git.log(fileName, sha, repoPath, maxCount))
|
||||
.then(data => new GitLogParserEnricher().enrich(data, fileName))
|
||||
.then(data => new GitLogParserEnricher().enrich(data, repoPath || fileName, !!repoPath))
|
||||
.catch(ex => {
|
||||
// Trap and cache expected log errors
|
||||
if (useCaching) {
|
||||
|
||||
Reference in New Issue
Block a user