Skip to content

Commit

Permalink
Fixes #91377 - save previous ref
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Amodio committed Mar 23, 2020
1 parent a5987ce commit 9c1e268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/git/src/timelineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ export class GitTimelineProvider implements TimelineProvider {
}

let dateFormatter: dayjs.Dayjs;
const items = commits.map<GitTimelineItem>(c => {
const items = commits.map<GitTimelineItem>((c, i) => {
const date = c.commitDate; // c.authorDate

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.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}`;
Expand Down

0 comments on commit 9c1e268

Please sign in to comment.