Git - fix bug with opening the first commit from the timeline view (#239111)

This commit is contained in:
Ladislau Szomoru
2025-01-29 17:03:52 +01:00
committed by GitHub
parent a29a921f0a
commit 2ae3d5ae35
2 changed files with 15 additions and 1 deletions

View File

@@ -222,6 +222,7 @@ export class GitTimelineProvider implements TimelineProvider {
const openComparison = l10n.t('Open Comparison');
const emptyTree = await repo.getEmptyTree();
const unpublishedCommits = await repo.getUnpublishedCommits();
const remoteHoverCommands = await provideSourceControlHistoryItemHoverCommands(this.model, repo);
@@ -243,7 +244,8 @@ export class GitTimelineProvider implements TimelineProvider {
const message = emojify(c.message);
const item = new GitTimelineItem(c.hash, commits[index + 1]?.hash ?? `${c.hash}^`, message, date?.getTime() ?? 0, c.hash, 'git:file:commit');
const previousRef = commits[index + 1]?.hash ?? emptyTree;
const item = new GitTimelineItem(c.hash, previousRef, message, date?.getTime() ?? 0, c.hash, 'git:file:commit');
item.iconPath = new ThemeIcon('git-commit');
if (showAuthor) {
item.description = c.authorName;