mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-17 09:45:36 -05:00
Adds .gitignore checks to reduce blame calls
Caches failed blames to reduce blame calls Only clear failed blames from cache on change/save Add better error messages and handling
This commit is contained in:
@@ -153,7 +153,7 @@ class GitBlameEditorController extends Disposable {
|
||||
|
||||
applyBlame(sha?: string) {
|
||||
return this._blame.then(blame => {
|
||||
if (!blame.lines.length) return;
|
||||
if (!blame || !blame.lines.length) return;
|
||||
|
||||
// HACK: Until https://github.com/Microsoft/vscode/issues/11485 is fixed -- toggle whitespace off
|
||||
this._toggleWhitespace = workspace.getConfiguration('editor').get('renderWhitespace') as boolean;
|
||||
@@ -212,7 +212,7 @@ class GitBlameEditorController extends Disposable {
|
||||
|
||||
applyHighlight(sha: string) {
|
||||
return this._blame.then(blame => {
|
||||
if (!blame.lines.length) return;
|
||||
if (!blame || !blame.lines.length) return;
|
||||
|
||||
const highlightDecorationRanges = blame.lines
|
||||
.filter(l => l.sha === sha)
|
||||
|
||||
Reference in New Issue
Block a user