Fixes issues with next commit navigation (renames)

Adds sha to log model to know if it is a full log or not
This commit is contained in:
Eric Amodio
2017-03-25 00:44:10 -04:00
parent c10a79a7ee
commit 8b5eed4714
10 changed files with 92 additions and 60 deletions

View File

@@ -42,7 +42,7 @@ export class DiffWithNextCommand extends ActiveEditorCommand {
const sha = (commit && commit.sha) || gitUri.sha;
const log = await this.git.getLogForFile(gitUri.repoPath, gitUri.fsPath, undefined, rangeOrLine as Range, sha ? undefined : 2);
const log = await this.git.getLogForFile(gitUri.repoPath, gitUri.fsPath, undefined, sha ? undefined : 2, rangeOrLine as Range);
if (!log) return window.showWarningMessage(`Unable to open diff. File is probably not under source control`);
commit = (sha && log.commits.get(sha)) || Iterables.first(log.commits.values());