Consolidates certain getLogForFile usage patterns into getLogCommit

This commit is contained in:
Eric Amodio
2017-03-24 16:09:52 -04:00
parent ee40dc6325
commit c10a79a7ee
8 changed files with 40 additions and 35 deletions

View File

@@ -56,10 +56,7 @@ export class CopyMessageToClipboardCommand extends ActiveEditorCommand {
}
// Get the full commit message -- since blame only returns the summary
const log = await this.git.getLogForFile(gitUri.repoPath, gitUri.fsPath, sha, undefined, 1);
if (!log) return undefined;
const commit = log.commits.get(sha);
const commit = await this.git.getLogCommit(gitUri.repoPath, gitUri.fsPath, sha);
if (!commit) return undefined;
message = commit.message;