Просмотр исходного кода

Updates view format settings

main
Eric Amodio 4 лет назад
Родитель
Сommit
83ad75e41d
10 измененных файлов: 123 добавлений и 172 удалений
  1. +11
    -15
      README.md
  2. +60
    -44
      package.json
  3. +15
    -20
      src/config.ts
  4. +12
    -51
      src/extension.ts
  5. +12
    -20
      src/views/nodes/commitFileNode.ts
  6. +2
    -2
      src/views/nodes/commitNode.ts
  7. +2
    -3
      src/views/nodes/resultsFileNode.ts
  8. +5
    -13
      src/views/nodes/stashFileNode.ts
  9. +2
    -2
      src/views/nodes/stashNode.ts
  10. +2
    -2
      src/views/nodes/statusFileNode.ts

+ 11
- 15
README.md Просмотреть файл

@ -752,21 +752,17 @@ GitLens is highly customizable and provides many configuration settings to allow
## View Settings [#](#view-settings- 'View Settings')
| Name | Description |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.commitFileFormat` | Specifies the format of a committed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs |
| `gitlens.views.commitFileDescriptionFormat` | Specifies the description format of a committed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs |
| `gitlens.views.commitFormat` | Specifies the format of committed changes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs |
| `gitlens.views.commitDescriptionFormat` | Specifies the description format of committed changes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs |
| `gitlens.views.defaultItemLimit` | Specifies the default number of items to show in a view list. Use 0 to specify no limit |
| `gitlens.views.pageItemLimit` | Specifies the number of items to show in a each page when paginating a view list. Use 0 to specify no limit |
| `gitlens.views.showRelativeDateMarkers` | Specifies whether to show relative date markers (_Less than a week ago_, _Over a week ago_, _Over a month ago_, etc) on revision (commit) histories in the views |
| `gitlens.views.stashFileFormat` | Specifies the format of a stashed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs |
| `gitlens.views.stashFileDescriptionFormat` | Specifies the description format of a stashed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs |
| `gitlens.views.stashFormat` | Specifies the format of stashes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs |
| `gitlens.views.stashDescriptionFormat` | Specifies the description format of stashes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs |
| `gitlens.views.statusFileFormat` | Specifies the format of the status of a working or committed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs |
| `gitlens.views.statusFileDescriptionFormat` | Specifies the description format of the status of a working or committed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs |
| Name | Description |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.defaultItemLimit` | Specifies the default number of items to show in a view list. Use 0 to specify no limit |
| `gitlens.views.formats.commits.label` | Specifies the format of commits in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs |
| `gitlens.views.formats.commits.description` | Specifies the description format of commits in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs |
| `gitlens.views.formats.files.label` | Specifies the format of a file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs |
| `gitlens.views.formats.files.description` | Specifies the description format of a file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs |
| `gitlens.views.formats.stashes.label` | Specifies the format of stashes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs |
| `gitlens.views.formats.stashes.description` | Specifies the description format of stashes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs |
| `gitlens.views.pageItemLimit` | Specifies the number of items to show in a each page when paginating a view list. Use 0 to specify no limit |
| `gitlens.views.showRelativeDateMarkers` | Specifies whether to show relative date markers (_Less than a week ago_, _Over a week ago_, _Over a month ago_, etc) on revision (commit) histories in the views |
## Commits View Settings [#](#commits-view-settings- 'Commits View Settings')

+ 60
- 44
package.json Просмотреть файл

@ -1640,28 +1640,20 @@
"scope": "window"
},
"gitlens.views.commitFileFormat": {
"type": "string",
"default": "${file}",
"markdownDescription": "Specifies the format of a committed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs",
"scope": "window"
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.files.label` instead",
"markdownDeprecationMessage": "Depreciated: Use `#gitlens.views.formats.files.label#` instead"
},
"gitlens.views.commitFileDescriptionFormat": {
"type": "string",
"default": "${directory}${ ← originalPath}",
"markdownDescription": "Specifies the description format of a committed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs",
"scope": "window"
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.files.description` instead",
"markdownDeprecationMessage": "Depreciated: Use `#gitlens.views.formats.files.description#` instead"
},
"gitlens.views.commitFormat": {
"type": "string",
"default": "${❰ tips ❱➤ }${message}",
"markdownDescription": "Specifies the format of committed changes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs",
"scope": "window"
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.commits.label` instead",
"markdownDeprecationMessage": "Depreciated: Use `#gitlens.views.commits.files.label#` instead"
},
"gitlens.views.commitDescriptionFormat": {
"type": "string",
"default": "${author, }${agoOrDate}",
"markdownDescription": "Specifies the description format of committed changes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs",
"scope": "window"
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.commits.description` instead",
"markdownDeprecationMessage": "Depreciated: Use `#gitlens.views.formats.commits.description#` instead"
},
"gitlens.views.commits.avatars": {
"type": "boolean",
@ -1790,10 +1782,40 @@
"markdownDescription": "Specifies the default number of items to show in a view list. Use 0 to specify no limit",
"scope": "window"
},
"gitlens.views.pageItemLimit": {
"type": "number",
"default": 20,
"markdownDescription": "Specifies the number of items to show in a each page when paginating a view list. Use 0 to specify no limit",
"gitlens.views.formats.commits.label": {
"type": "string",
"default": "${❰ tips ❱➤ }${message}",
"markdownDescription": "Specifies the format of commits in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs",
"scope": "window"
},
"gitlens.views.formats.commits.description": {
"type": "string",
"default": "${author, }${agoOrDate}",
"markdownDescription": "Specifies the description format of commits in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs",
"scope": "window"
},
"gitlens.views.formats.files.label": {
"type": "string",
"default": "${working }${file}",
"markdownDescription": "Specifies the format of a file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs",
"scope": "window"
},
"gitlens.views.formats.files.description": {
"type": "string",
"default": "${directory}${ ← originalPath}",
"markdownDescription": "Specifies the description format of a file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs",
"scope": "window"
},
"gitlens.views.formats.stashes.label": {
"type": "string",
"default": "${message}",
"markdownDescription": "Specifies the format of stashes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs",
"scope": "window"
},
"gitlens.views.formats.stashes.description": {
"type": "string",
"default": "${agoOrDate}",
"markdownDescription": "Specifies the description format of stashes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs",
"scope": "window"
},
"gitlens.views.fileHistory.avatars": {
@ -1814,6 +1836,12 @@
"markdownDescription": "Specifies whether to show the _Line History_ view",
"scope": "window"
},
"gitlens.views.pageItemLimit": {
"type": "number",
"default": 20,
"markdownDescription": "Specifies the number of items to show in a each page when paginating a view list. Use 0 to specify no limit",
"scope": "window"
},
"gitlens.views.remotes.avatars": {
"type": "boolean",
"default": true,
@ -2052,28 +2080,20 @@
"scope": "window"
},
"gitlens.views.stashFileFormat": {
"type": "string",
"default": "${file}",
"markdownDescription": "Specifies the format of a stashed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs",
"scope": "window"
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.files.label` instead",
"markdownDeprecationMessage": "Depreciated: Use `#gitlens.views.formats.files.label#` instead"
},
"gitlens.views.stashFileDescriptionFormat": {
"type": "string",
"default": "${directory}${ ← originalPath}",
"markdownDescription": "Specifies the description format of a stashed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs",
"scope": "window"
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.files.description` instead",
"markdownDeprecationMessage": "Depreciated: Use `#gitlens.views.formats.files.description#` instead"
},
"gitlens.views.stashFormat": {
"type": "string",
"default": "${message}",
"markdownDescription": "Specifies the format of stashes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs",
"scope": "window"
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.stashes.label` instead",
"markdownDeprecationMessage": "Depreciated: Use `#gitlens.views.stashes.files.label#` instead"
},
"gitlens.views.stashDescriptionFormat": {
"type": "string",
"default": "${changes • }${agoOrDate}",
"markdownDescription": "Specifies the description format of stashes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs",
"scope": "window"
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.stashes.description` instead",
"markdownDeprecationMessage": "Depreciated: Use `#gitlens.views.formats.stashes.description#` instead"
},
"gitlens.views.stashes.files.compact": {
"type": "boolean",
@ -2104,16 +2124,12 @@
"scope": "window"
},
"gitlens.views.statusFileFormat": {
"type": "string",
"default": "${working }${file}",
"markdownDescription": "Specifies the format of the status of a working or committed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs",
"scope": "window"
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.files.label` instead",
"markdownDeprecationMessage": "Depreciated: Use `#gitlens.views.formats.files.label#` instead"
},
"gitlens.views.statusFileDescriptionFormat": {
"type": "string",
"default": "${directory}${ ← originalPath}",
"markdownDescription": "Specifies the description format of the status of a working or committed file in the views. See [_File Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#file-tokens) in the GitLens docs",
"scope": "window"
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.files.description` instead",
"markdownDeprecationMessage": "Depreciated: Use `#gitlens.views.formats.files.description#` instead"
},
"gitlens.views.tags.avatars": {
"type": "boolean",

+ 15
- 20
src/config.ts Просмотреть файл

@ -400,35 +400,30 @@ export interface RemotesUrlsConfig {
}
export interface ViewsCommonConfig {
commitFileDescriptionFormat: string;
commitFileFormat: string;
commitDescriptionFormat: string;
commitFormat: string;
defaultItemLimit: number;
formats: {
commits: {
label: string;
description: string;
};
files: {
label: string;
description: string;
};
stashes: {
label: string;
description: string;
};
};
pageItemLimit: number;
showRelativeDateMarkers: boolean;
stashFileDescriptionFormat: string;
stashFileFormat: string;
stashDescriptionFormat: string;
stashFormat: string;
statusFileDescriptionFormat: string;
statusFileFormat: string;
}
export const viewsCommonConfigKeys: (keyof ViewsCommonConfig)[] = [
'commitFileDescriptionFormat',
'commitFileFormat',
'commitDescriptionFormat',
'commitFormat',
'defaultItemLimit',
'formats',
'pageItemLimit',
'showRelativeDateMarkers',
'stashFileDescriptionFormat',
'stashFileFormat',
'stashDescriptionFormat',
'stashFormat',
'statusFileDescriptionFormat',
'statusFileFormat',
];
interface ViewsConfigs {

+ 12
- 51
src/extension.ts Просмотреть файл

@ -1,7 +1,6 @@
'use strict';
import { commands, ExtensionContext, extensions, window, workspace } from 'vscode';
import { Commands, registerCommands } from './commands';
import { ViewShowBranchComparison } from './config';
import { configuration, Configuration } from './configuration';
import { ContextKeys, extensionQualifiedId, GlobalState, GlyphChars, setContext } from './constants';
import { Container } from './container';
@ -10,7 +9,7 @@ import { GitService } from './git/gitService';
import { GitUri } from './git/gitUri';
import { Logger } from './logger';
import { Messages } from './messages';
import { Strings, Versions } from './system';
import { Strings } from './system';
import { ViewNode } from './views/nodes';
export async function activate(context: ExtensionContext) {
@ -71,7 +70,7 @@ export async function activate(context: ExtensionContext) {
const cfg = configuration.get();
await migrateSettings(context, previousVersion);
// await migrateSettings(context, previousVersion);
try {
await GitService.initialize();
@ -115,56 +114,18 @@ export async function setEnabled(enabled: boolean): Promise {
await Promise.all([setContext(ContextKeys.Enabled, enabled), setContext(ContextKeys.Disabled, !enabled)]);
}
async function migrateSettings(context: ExtensionContext, previousVersion: string | undefined) {
if (previousVersion === undefined) return;
// async function migrateSettings(context: ExtensionContext, previousVersion: string | undefined) {
// if (previousVersion === undefined) return;
const previous = Versions.fromString(previousVersion);
// const previous = Versions.fromString(previousVersion);
try {
if (Versions.compare(previous, Versions.from(9, 8, 5)) !== 1) {
const value = configuration.get('views', 'commitFormat');
if (!/\btips\b/.test(value)) {
await configuration.updateEffective('views', 'commitFormat', `\${ tips }${value}`);
}
} else if (Versions.compare(previous, Versions.from(9, 8, 2)) !== 1) {
const name = configuration.name('views', 'repositories', 'showBranchComparison');
await configuration.migrate(name, 'views', 'repositories', 'showBranchComparison', {
migrationFn: (v: boolean) => (v === false ? false : ViewShowBranchComparison.Working),
});
} else if (Versions.compare(previous, Versions.from(9, 6, 3)) !== 1) {
const formatMigrationFn = (v: string) => {
if (v == null || v.length === 0) return v;
return (
v
// eslint-disable-next-line no-template-curly-in-string
.replace(/\$\{authorAgo\}/g, '${author}, ${ago}')
// eslint-disable-next-line no-template-curly-in-string
.replace(/\$\{authorAgoOrDate\}/g, '${author}, ${agoOrDate}')
);
};
await Promise.all(
[
configuration.name('blame', 'format'),
configuration.name('currentLine', 'format'),
configuration.name('hovers', 'detailsMarkdownFormat'),
configuration.name('statusBar', 'format'),
configuration.name('views', 'commitFormat'),
configuration.name('views', 'commitDescriptionFormat'),
configuration.name('views', 'stashFormat'),
configuration.name('views', 'stashDescriptionFormat'),
].map(s =>
configuration.migrate(s, s as any, {
migrationFn: formatMigrationFn,
}),
),
);
}
} catch (ex) {
Logger.error(ex, 'migrateSettings');
}
}
// try {
// if (Versions.compare(previous, Versions.from(11, 0, 0)) !== 1) {
// }
// } catch (ex) {
// Logger.error(ex, 'migrateSettings');
// }
// }
function notifyOnUnsupportedGitVersion(version: string) {
if (GitService.compareGitVersion('2.7.2') !== -1) return;

+ 12
- 20
src/views/nodes/commitFileNode.ts Просмотреть файл

@ -121,11 +121,11 @@ export class CommitFileNode extends ViewRefFileNode {
private get description() {
return this._options.displayAsCommit
? CommitFormatter.fromTemplate(this.getCommitDescriptionTemplate(), this.commit, {
? CommitFormatter.fromTemplate(this.getDescriptionFormat(), this.commit, {
dateFormat: Container.config.defaultDateFormat,
messageTruncateAtNewLine: true,
})
: StatusFileFormatter.fromTemplate(this.getCommitFileDescriptionTemplate(), this.file, {
: StatusFileFormatter.fromTemplate(this.view.config.formats.files.description, this.file, {
relativePath: this.relativePath,
});
}
@ -142,11 +142,11 @@ export class CommitFileNode extends ViewRefFileNode {
get label() {
if (this._label === undefined) {
this._label = this._options.displayAsCommit
? CommitFormatter.fromTemplate(this.getCommitTemplate(), this.commit, {
? CommitFormatter.fromTemplate(this.getLabelFormat(), this.commit, {
dateFormat: Container.config.defaultDateFormat,
messageTruncateAtNewLine: true,
})
: StatusFileFormatter.fromTemplate(this.getCommitFileTemplate(), this.file, {
: StatusFileFormatter.fromTemplate(this.view.config.formats.files.label, this.file, {
relativePath: this.relativePath,
});
}
@ -192,22 +192,6 @@ export class CommitFileNode extends ViewRefFileNode {
);
}
protected getCommitTemplate() {
return this.view.config.commitFormat;
}
protected getCommitDescriptionTemplate() {
return this.view.config.commitDescriptionFormat;
}
protected getCommitFileTemplate() {
return this.view.config.commitFileFormat;
}
protected getCommitFileDescriptionTemplate() {
return this.view.config.commitFileDescriptionFormat;
}
getCommand(): Command | undefined {
let line;
if (this.commit.line !== undefined) {
@ -231,4 +215,12 @@ export class CommitFileNode extends ViewRefFileNode {
arguments: [undefined, commandArgs],
};
}
protected getLabelFormat() {
return this.view.config.formats.commits.label;
}
protected getDescriptionFormat() {
return this.view.config.formats.commits.description;
}
}

+ 2
- 2
src/views/nodes/commitNode.ts Просмотреть файл

@ -99,7 +99,7 @@ export class CommitNode extends ViewRefNode
}
async getTreeItem(): Promise<TreeItem> {
const label = CommitFormatter.fromTemplate(this.view.config.commitFormat, this.commit, {
const label = CommitFormatter.fromTemplate(this.view.config.formats.commits.label, this.commit, {
dateFormat: Container.config.defaultDateFormat,
getBranchAndTagTips: (sha: string) => this.getBranchAndTagTips?.(sha, true),
messageTruncateAtNewLine: true,
@ -114,7 +114,7 @@ export class CommitNode extends ViewRefNode
this.branch?.current && this.branch.sha === this.commit.ref ? '+HEAD' : ''
}${this.unpublished ? '+unpublished' : ''}`;
item.description = CommitFormatter.fromTemplate(this.view.config.commitDescriptionFormat, this.commit, {
item.description = CommitFormatter.fromTemplate(this.view.config.formats.commits.description, this.commit, {
dateFormat: Container.config.defaultDateFormat,
messageTruncateAtNewLine: true,
});

+ 2
- 3
src/views/nodes/resultsFileNode.ts Просмотреть файл

@ -61,7 +61,7 @@ export class ResultsFileNode extends ViewRefFileNode {
get description() {
if (this._description === undefined) {
this._description = StatusFileFormatter.fromTemplate(
this.view.config.commitFileDescriptionFormat,
this.view.config.formats.files.description,
this.file,
{
relativePath: this.relativePath,
@ -82,8 +82,7 @@ export class ResultsFileNode extends ViewRefFileNode {
private _label: string | undefined;
get label() {
if (this._label === undefined) {
// eslint-disable-next-line no-template-curly-in-string
this._label = StatusFileFormatter.fromTemplate('${file}', this.file, {
this._label = StatusFileFormatter.fromTemplate(this.view.config.formats.files.label, this.file, {
relativePath: this.relativePath,
});
}

+ 5
- 13
src/views/nodes/stashFileNode.ts Просмотреть файл

@ -9,23 +9,15 @@ export class StashFileNode extends CommitFileNode {
super(view, parent, file, commit);
}
protected get contextValye(): ContextValues {
protected get contextValue(): ContextValues {
return ContextValues.StashFile;
}
protected getCommitTemplate() {
return this.view.config.stashFormat;
protected getLabelFormat() {
return this.view.config.formats.stashes.label;
}
protected getCommitDescriptionTemplate() {
return this.view.config.stashDescriptionFormat;
}
protected getCommitFileTemplate() {
return this.view.config.stashFileFormat;
}
protected getCommitFileDescriptionTemplate() {
return this.view.config.stashFileDescriptionFormat;
protected getDescriptionFormat() {
return this.view.config.formats.stashes.description;
}
}

+ 2
- 2
src/views/nodes/stashNode.ts Просмотреть файл

@ -58,14 +58,14 @@ export class StashNode extends ViewRefNode {
getTreeItem(): TreeItem {
const item = new TreeItem(
CommitFormatter.fromTemplate(this.view.config.stashFormat, this.commit, {
CommitFormatter.fromTemplate(this.view.config.formats.stashes.label, this.commit, {
messageTruncateAtNewLine: true,
dateFormat: Container.config.defaultDateFormat,
}),
TreeItemCollapsibleState.Collapsed,
);
item.id = this.id;
item.description = CommitFormatter.fromTemplate(this.view.config.stashDescriptionFormat, this.commit, {
item.description = CommitFormatter.fromTemplate(this.view.config.formats.stashes.description, this.commit, {
messageTruncateAtNewLine: true,
dateFormat: Container.config.defaultDateFormat,
});

+ 2
- 2
src/views/nodes/statusFileNode.ts Просмотреть файл

@ -137,7 +137,7 @@ export class StatusFileNode extends ViewNode {
get description() {
if (this._description == null) {
this._description = StatusFileFormatter.fromTemplate(
this.view.config.statusFileDescriptionFormat,
this.view.config.formats.files.description,
{
...this.file,
commit: this.commit,
@ -162,7 +162,7 @@ export class StatusFileNode extends ViewNode {
get label() {
if (this._label == null) {
this._label = StatusFileFormatter.fromTemplate(
this.view.config.statusFileFormat,
this.view.config.formats.files.label,
{
...this.file,
commit: this.commit,

Загрузка…
Отмена
Сохранить