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:
Eric Amodio
2016-09-14 13:30:14 -04:00
parent dfd17a8f17
commit fba6def3e4
7 changed files with 190 additions and 82 deletions

View File

@@ -90,7 +90,7 @@ export default class GitBlameContentProvider implements TextDocumentContentProvi
clearInterval(handle);
this.git.getBlameForShaRange(data.fileName, data.sha, data.range).then(blame => {
if (!blame.lines.length) return;
if (!blame || !blame.lines.length) return;
editor.setDecorations(this._blameDecoration, blame.lines.map(l => {
return {