Adds catch to blameLine to avoid strange issues

Removes Git: from all the commands
Removes unused enricher
This commit is contained in:
Eric Amodio
2016-09-21 09:46:29 -04:00
parent 7a4dcae8c7
commit b047fbc394
4 changed files with 16 additions and 103 deletions

View File

@@ -5,9 +5,10 @@ import * as tmp from 'tmp';
import {spawnPromise} from 'spawn-rx';
export * from './gitEnrichment';
//export * from './enrichers/blameRegExpEnricher';
export * from './enrichers/blameParserEnricher';
const UncommitedRegex = /^[0]+$/;
function gitCommand(cwd: string, ...args) {
return spawnPromise('git', args, { cwd: cwd })
.then(s => {
@@ -100,4 +101,8 @@ export default class Git {
return gitCommand(root, 'show', `${sha}:./${file}`);
}
static isUncommitted(sha: string) {
return UncommitedRegex.test(sha);
}
}