Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Added

- Adds a `gitlens.views.showCurrentBranchOnTop` setting to specify whether the current branch is shown at the top of the views — closes [#3520](https://github.com/gitkraken/vscode-gitlens/issues/3520)
- Adds option to display first name only on inline blame

### Fixed

Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@
"scope": "window",
"order": 10
},
"gitlens.currentLine.fullUserName.enabled": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to provide a full name of user to inline blame annotation for the current line.",
"scope": "window",
"order": 15
},
"gitlens.currentLine.pullRequests.enabled": {
"type": "boolean",
"default": true,
Expand Down
1 change: 1 addition & 0 deletions src/annotations/lineAnnotationController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ export class LineAnnotationController implements Disposable {
getBranchAndTagTips: getBranchAndTagTips,
pullRequest: pr?.value,
pullRequestPendingMessage: `PR ${GlyphChars.Ellipsis}`,
authorShortStyle: !cfg.fullUserName.enabled,
},
fontOptions,
cfg.scrollable,
Expand Down
4 changes: 4 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface Config {
readonly fontStyle: string;
readonly fontWeight: string;
readonly format: string;
readonly fullName: string;
readonly heatmap: {
readonly enabled: boolean;
readonly location: 'left' | 'right';
Expand Down Expand Up @@ -63,6 +64,9 @@ export interface Config {
readonly fontStyle: string;
readonly fontWeight: string;
readonly format: string;
readonly fullUserName: {
readonly enabled: boolean;
};
readonly pullRequests: {
readonly enabled: boolean;
};
Expand Down
4 changes: 4 additions & 0 deletions src/git/formatters/commitFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export interface CommitFormatOptions extends FormatOptions {
dateStyle?: DateStyle;
editor?: { line: number; uri: Uri };
footnotes?: Map<number, string>;
authorShortStyle?: boolean;
getBranchAndTagTips?: (sha: string, options?: { compact?: boolean; icons?: boolean }) => string | undefined;
htmlFormat?: {
classes?: {
Expand Down Expand Up @@ -201,6 +202,9 @@ export class CommitFormatter extends Formatter<GitCommit, CommitFormatOptions> {

get author(): string {
let { name, email } = this._item.author;
if (this._options.authorShortStyle) {
name = name.split(' ')[0];
}
const author = this._padOrTruncate(name, this._options.tokenOptions.author);

switch (this._options.outputFormat) {
Expand Down
Loading