Fixes more issues with paths :(

This commit is contained in:
Eric Amodio
2017-03-22 03:04:52 -04:00
parent 671f1ca6c1
commit 43e4337358
4 changed files with 16 additions and 17 deletions

View File

@@ -20,11 +20,11 @@ export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCachedCommand
let workingFileName = commit && commit.workingFileName;
const gitUri = await GitUri.fromUri(uri, this.git);
if (!sha) {
if (!editor) return undefined;
const gitUri = await GitUri.fromUri(uri, this.git);
const blameline = editor.selection.active.line - gitUri.offset;
if (blameline < 0) return undefined;
@@ -54,7 +54,7 @@ export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCachedCommand
}
if (!fileLog) {
const log = await this.git.getLogForFile(undefined, commit ? commit.uri.fsPath : uri.fsPath, sha, undefined, 2);
const log = await this.git.getLogForFile(commit ? commit.repoPath : gitUri.repoPath, commit ? commit.uri.fsPath : gitUri.fsPath, sha, undefined, 2);
if (!log) return window.showWarningMessage(`Unable to show commit file details`);
commit = log.commits.get(sha);