Skip to content

Commit 0ed6b79

Browse files
committed
Fixes #345 - date formats not working
1 parent ab9af90 commit 0ed6b79

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
99
- Adds an indicator to the *GitLens* explorer's branch history to mark the the tips of all branches
1010

1111
### Fixed
12+
- Fixes [#345](https://github.com/eamodio/vscode-gitlens/issues/345) - Custom date formats don't work in the GitLens view
1213
- Fixes issue where username and/or password in a remote urls could be shown
1314

1415
## [8.2.1] - 2018-04-11

src/views/commitFileNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class CommitFileNode extends ExplorerNode {
9999
this.commit,
100100
{
101101
truncateMessageAtNewLine: true,
102-
dataFormat: Container.config.defaultDateFormat
102+
dateFormat: Container.config.defaultDateFormat
103103
} as ICommitFormatOptions
104104
)
105105
: StatusFileFormatter.fromTemplate(
@@ -137,7 +137,7 @@ export class CommitFileNode extends ExplorerNode {
137137
: `\${author} ${GlyphChars.Dash} \${id}\n\${ago} (\${date})\n\n\${message}`,
138138
this.commit,
139139
{
140-
dataFormat: Container.config.defaultDateFormat
140+
dateFormat: Container.config.defaultDateFormat
141141
} as ICommitFormatOptions
142142
);
143143
}

src/views/commitNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class CommitNode extends ExplorerRefNode {
4848
getTreeItem(): TreeItem {
4949
let label = CommitFormatter.fromTemplate(this.explorer.config.commitFormat, this.commit, {
5050
truncateMessageAtNewLine: true,
51-
dataFormat: Container.config.defaultDateFormat
51+
dateFormat: Container.config.defaultDateFormat
5252
} as ICommitFormatOptions);
5353

5454
const branchTips = this.getBranchTips && this.getBranchTips(this.commit.sha);
@@ -77,7 +77,7 @@ export class CommitNode extends ExplorerRefNode {
7777
: `\${author} ${GlyphChars.Dash} \${id}${branchTips !== undefined ? ` (${branchTips})` : ''}\n\${ago} (\${date})\n\n\${message}`,
7878
this.commit,
7979
{
80-
dataFormat: Container.config.defaultDateFormat
80+
dateFormat: Container.config.defaultDateFormat
8181
} as ICommitFormatOptions
8282
);
8383

src/views/stashNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export class StashNode extends ExplorerRefNode {
4141
getTreeItem(): TreeItem {
4242
const item = new TreeItem(CommitFormatter.fromTemplate(this.explorer.config.stashFormat, this.commit, {
4343
truncateMessageAtNewLine: true,
44-
dataFormat: Container.config.defaultDateFormat
44+
dateFormat: Container.config.defaultDateFormat
4545
} as ICommitFormatOptions), TreeItemCollapsibleState.Collapsed);
4646
item.contextValue = ResourceType.Stash;
4747
item.tooltip = CommitFormatter.fromTemplate(
4848
'${ago} (${date})\n\n${message}',
4949
this.commit,
5050
{
51-
dataFormat: Container.config.defaultDateFormat
51+
dateFormat: Container.config.defaultDateFormat
5252
} as ICommitFormatOptions
5353
);
5454

0 commit comments

Comments
 (0)