From fc0bc05149dc8e46d0a4102c0cc0a28d4b22af46 Mon Sep 17 00:00:00 2001 From: Chrismettal Date: Thu, 16 Dec 2021 18:22:40 +0100 Subject: [PATCH] Change abbreviated commit hash length to 7 chars --- src/utils.ts | 4 ++-- web/main.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 62c1e15f..71eabe13 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -120,12 +120,12 @@ export function doesFileExist(path: string) { /* General Methods */ /** - * Abbreviate a commit hash to the first eight characters. + * Abbreviate a commit hash to the first seven characters. * @param commitHash The full commit hash. * @returns The abbreviated commit hash. */ export function abbrevCommit(commitHash: string) { - return commitHash.substring(0, 8); + return commitHash.substring(0, 7); } /** diff --git a/web/main.ts b/web/main.ts index 29c23c82..72cca1cf 100644 --- a/web/main.ts +++ b/web/main.ts @@ -3814,7 +3814,7 @@ function haveFilesChanged(oldFiles: ReadonlyArray | null, newF } function abbrevCommit(commitHash: string) { - return commitHash.substring(0, 8); + return commitHash.substring(0, 7); } function getRepoDropdownOptions(repos: Readonly) {