Reworks git command error handling

Switches to use the new diffWith command
This commit is contained in:
Eric Amodio
2017-09-11 00:39:52 -04:00
parent d420d82ab2
commit 4102bdd471
14 changed files with 230 additions and 237 deletions

View File

@@ -72,6 +72,8 @@ export const RepoChangedReasons = {
export class GitService extends Disposable {
static fakeSha = 'ffffffffffffffffffffffffffffffffffffffff';
private _onDidBlameFail = new EventEmitter<string>();
get onDidBlameFail(): Event<string> {
return this._onDidBlameFail.event;
@@ -954,6 +956,8 @@ export class GitService extends Disposable {
Logger.log(`getVersionedFile('${repoPath}', '${fileName}', ${sha})`);
const file = await Git.getVersionedFile(repoPath, fileName, sha);
if (file === undefined) return undefined;
const cacheKey = this.getCacheEntryKey(file);
const entry = new UriCacheEntry(new GitUri(Uri.file(fileName), { sha, repoPath: repoPath!, fileName }));
this._uriCache.set(cacheKey, entry);