SCM - show multi-line commit message in hover (#227538)

* SCM - show multi-line commit message in hover

* Fix tests
This commit is contained in:
Ladislau Szomoru
2024-09-04 11:09:17 +02:00
committed by GitHub
parent 5df406f54e
commit 87f05e126a
5 changed files with 58 additions and 50 deletions

View File

@@ -127,15 +127,12 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
await ensureEmojis();
return commits.map(commit => {
const newLineIndex = commit.message.indexOf('\n');
const subject = newLineIndex !== -1 ? commit.message.substring(0, newLineIndex) : commit.message;
const labels = this.resolveHistoryItemLabels(commit);
return {
id: commit.hash,
parentIds: commit.parents,
message: emojify(subject),
message: emojify(commit.message),
author: commit.authorName,
icon: new ThemeIcon('git-commit'),
displayId: commit.hash.substring(0, 8),