|
@ -27,7 +27,7 @@ export default class DiffWithWorkingCommand extends EditorCommand { |
|
|
const gitUri = GitUri.fromUri(uri, this.git); |
|
|
const gitUri = GitUri.fromUri(uri, this.git); |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
const log = await this.git.getLogForFile(gitUri.fsPath, gitUri.sha, gitUri.repoPath); |
|
|
|
|
|
|
|
|
const log = await this.git.getLogForFile(gitUri.fsPath, gitUri.sha, gitUri.repoPath, undefined, gitUri.sha ? undefined : 1); |
|
|
if (!log) return window.showWarningMessage(`Unable to open diff. File is probably not under source control`); |
|
|
if (!log) return window.showWarningMessage(`Unable to open diff. File is probably not under source control`); |
|
|
|
|
|
|
|
|
commit = (gitUri.sha && log.commits.get(gitUri.sha)) || Iterables.first(log.commits.values()); |
|
|
commit = (gitUri.sha && log.commits.get(gitUri.sha)) || Iterables.first(log.commits.values()); |
|
|