mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-17 02:51:47 -05:00
Shortens shas for display in explorer UIs
This commit is contained in:
@@ -693,7 +693,7 @@ export class GitService extends Disposable {
|
|||||||
private static _toReferenceGitContentUri(commit: GitCommit, scheme: DocumentSchemes, commitCount: number, data: IGitUriData) {
|
private static _toReferenceGitContentUri(commit: GitCommit, scheme: DocumentSchemes, commitCount: number, data: IGitUriData) {
|
||||||
const pad = (n: number) => ('0000000' + n).slice(-('' + commitCount).length);
|
const pad = (n: number) => ('0000000' + n).slice(-('' + commitCount).length);
|
||||||
const ext = path.extname(data.fileName);
|
const ext = path.extname(data.fileName);
|
||||||
const uriPath = `${path.relative(commit.repoPath, data.fileName.slice(0, -ext.length))}/${commit.sha}${ext}`;
|
const uriPath = `${path.relative(commit.repoPath, data.fileName.slice(0, -ext.length))}/${commit.shortSha}${ext}`;
|
||||||
|
|
||||||
let message = commit.message;
|
let message = commit.message;
|
||||||
if (message.length > 50) {
|
if (message.length > 50) {
|
||||||
|
|||||||
Reference in New Issue
Block a user