Browse Source

Fixes #345 - date formats not working

main
Eric Amodio 6 years ago
parent
commit
0ed6b79843
4 changed files with 7 additions and 6 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -2
      src/views/commitFileNode.ts
  3. +2
    -2
      src/views/commitNode.ts
  4. +2
    -2
      src/views/stashNode.ts

+ 1
- 0
CHANGELOG.md View File

@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Adds an indicator to the *GitLens* explorer's branch history to mark the the tips of all branches
### Fixed
- Fixes [#345](https://github.com/eamodio/vscode-gitlens/issues/345) - Custom date formats don't work in the GitLens view
- Fixes issue where username and/or password in a remote urls could be shown
## [8.2.1] - 2018-04-11

+ 2
- 2
src/views/commitFileNode.ts View File

@ -99,7 +99,7 @@ export class CommitFileNode extends ExplorerNode {
this.commit,
{
truncateMessageAtNewLine: true,
dataFormat: Container.config.defaultDateFormat
dateFormat: Container.config.defaultDateFormat
} as ICommitFormatOptions
)
: StatusFileFormatter.fromTemplate(
@ -137,7 +137,7 @@ export class CommitFileNode extends ExplorerNode {
: `\${author} ${GlyphChars.Dash} \${id}\n\${ago} (\${date})\n\n\${message}`,
this.commit,
{
dataFormat: Container.config.defaultDateFormat
dateFormat: Container.config.defaultDateFormat
} as ICommitFormatOptions
);
}

+ 2
- 2
src/views/commitNode.ts View File

@ -48,7 +48,7 @@ export class CommitNode extends ExplorerRefNode {
getTreeItem(): TreeItem {
let label = CommitFormatter.fromTemplate(this.explorer.config.commitFormat, this.commit, {
truncateMessageAtNewLine: true,
dataFormat: Container.config.defaultDateFormat
dateFormat: Container.config.defaultDateFormat
} as ICommitFormatOptions);
const branchTips = this.getBranchTips && this.getBranchTips(this.commit.sha);
@ -77,7 +77,7 @@ export class CommitNode extends ExplorerRefNode {
: `\${author} ${GlyphChars.Dash} \${id}${branchTips !== undefined ? ` (${branchTips})` : ''}\n\${ago} (\${date})\n\n\${message}`,
this.commit,
{
dataFormat: Container.config.defaultDateFormat
dateFormat: Container.config.defaultDateFormat
} as ICommitFormatOptions
);

+ 2
- 2
src/views/stashNode.ts View File

@ -41,14 +41,14 @@ export class StashNode extends ExplorerRefNode {
getTreeItem(): TreeItem {
const item = new TreeItem(CommitFormatter.fromTemplate(this.explorer.config.stashFormat, this.commit, {
truncateMessageAtNewLine: true,
dataFormat: Container.config.defaultDateFormat
dateFormat: Container.config.defaultDateFormat
} as ICommitFormatOptions), TreeItemCollapsibleState.Collapsed);
item.contextValue = ResourceType.Stash;
item.tooltip = CommitFormatter.fromTemplate(
'${ago} (${date})\n\n${message}',
this.commit,
{
dataFormat: Container.config.defaultDateFormat
dateFormat: Container.config.defaultDateFormat
} as ICommitFormatOptions
);

Loading…
Cancel
Save