Refactors GitService to mostly use GitUris

This commit is contained in:
Eric Amodio
2017-03-18 01:15:50 -04:00
parent b51d25829b
commit 164cb2bfe0
20 changed files with 88 additions and 82 deletions

View File

@@ -27,7 +27,7 @@ export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCommand {
if (blameline < 0) return undefined;
try {
const blame = await this.git.getBlameForLine(gitUri.fsPath, blameline, gitUri.sha, gitUri.repoPath);
const blame = await this.git.getBlameForLine(gitUri, blameline);
if (!blame) return window.showWarningMessage(`Unable to show commit file details. File is probably not under source control`);
sha = blame.commit.isUncommitted ? blame.commit.previousSha : blame.commit.sha;
@@ -51,7 +51,7 @@ export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCommand {
}
if (!fileLog) {
const log = await this.git.getLogForFile(uri.fsPath, sha, undefined, undefined, 2);
const log = await this.git.getLogForFile(undefined, uri.fsPath, sha, undefined, 2);
if (!log) return window.showWarningMessage(`Unable to show commit file details`);
commit = log.commits.get(sha);