Adds support for git commands on scheme=git

Rewrites blame annotation controller and provider - fixes whitespace issues, reduces overhead, and provides better performance
Rewrites status bar blame support - reduces overhead and provides better performance
Adds showFileHistory command to status bar
Renames showHistory to showFileHistory
Fixes log to use iso 8601 for dates
This commit is contained in:
Eric Amodio
2016-11-12 01:25:42 -05:00
parent 7ace9cb152
commit 638a6dc838
28 changed files with 592 additions and 259 deletions

View File

@@ -19,10 +19,10 @@ interface ILogEntry {
export class GitLogParserEnricher implements IGitEnricher<IGitLog> {
private _parseEntries(data: string): ILogEntry[] {
if (!data) return null;
if (!data) return undefined;
const lines = data.split('\n');
if (!lines.length) return null;
if (!lines.length) return undefined;
const entries: ILogEntry[] = [];
@@ -49,7 +49,7 @@ export class GitLogParserEnricher implements IGitEnricher<IGitLog> {
break;
case 'author-date':
entry.authorDate = lineParts.slice(1).join(' ').trim();
entry.authorDate = `${lineParts[1]}T${lineParts[2]}${lineParts[3]}`;
break;
// case 'committer':
@@ -76,7 +76,7 @@ export class GitLogParserEnricher implements IGitEnricher<IGitLog> {
}
entries.push(entry);
entry = null;
entry = undefined;
break;
default:
@@ -89,7 +89,7 @@ export class GitLogParserEnricher implements IGitEnricher<IGitLog> {
enrich(data: string, fileName: string): IGitLog {
const entries = this._parseEntries(data);
if (!entries) return null;
if (!entries) return undefined;
const authors: Map<string, IGitAuthor> = new Map();
const commits: Map<string, GitCommit> = new Map();