mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Fixes #91377 - save previous ref
This commit is contained in:
parent
a5987ce853
commit
9c1e26890c
|
@ -146,12 +146,12 @@ export class GitTimelineProvider implements TimelineProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
let dateFormatter: dayjs.Dayjs;
|
let dateFormatter: dayjs.Dayjs;
|
||||||
const items = commits.map<GitTimelineItem>(c => {
|
const items = commits.map<GitTimelineItem>((c, i) => {
|
||||||
const date = c.commitDate; // c.authorDate
|
const date = c.commitDate; // c.authorDate
|
||||||
|
|
||||||
dateFormatter = dayjs(date);
|
dateFormatter = dayjs(date);
|
||||||
|
|
||||||
const item = new GitTimelineItem(c.hash, `${c.hash}^`, c.message, date?.getTime() ?? 0, c.hash, 'git:file:commit');
|
const item = new GitTimelineItem(c.hash, commits[i + 1]?.hash ?? `${c.hash}^`, c.message, date?.getTime() ?? 0, c.hash, 'git:file:commit');
|
||||||
item.iconPath = new (ThemeIcon as any)('git-commit');
|
item.iconPath = new (ThemeIcon as any)('git-commit');
|
||||||
item.description = c.authorName;
|
item.description = c.authorName;
|
||||||
item.detail = `${c.authorName} (${c.authorEmail}) \u2014 ${c.hash.substr(0, 8)}\n${dateFormatter.format('MMMM Do, YYYY h:mma')}\n\n${c.message}`;
|
item.detail = `${c.authorName} (${c.authorEmail}) \u2014 ${c.hash.substr(0, 8)}\n${dateFormatter.format('MMMM Do, YYYY h:mma')}\n\n${c.message}`;
|
||||||
|
|
Loading…
Reference in a new issue