From e5d058db1d3d0061d628ee1ef06dcf85437fa925 Mon Sep 17 00:00:00 2001 From: Cody Kaup Date: Wed, 11 Sep 2024 16:59:34 -0500 Subject: [PATCH] Use const for uncommittedHash --- node-src/git/git.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node-src/git/git.ts b/node-src/git/git.ts index c2627fc71..b9ad31ede 100644 --- a/node-src/git/git.ts +++ b/node-src/git/git.ts @@ -108,13 +108,13 @@ export async function getUncommittedHash() { const listUntrackedFiles = 'git ls-files --others --exclude-standard'; const listUncommittedFiles = [listStagedFiles, listUnstagedFiles, listUntrackedFiles].join(';'); - let uncommittedHash = await execGitCommand( + const uncommittedHashWithPadding = await execGitCommand( // Pass the combined list of filenames to hash-object to retrieve a list of hashes. Then pass // the list of hashes to hash-object again to retrieve a single hash of all hashes. We use // stdin to avoid the limit on command line arguments. `(${listUncommittedFiles}) | git hash-object --stdin-paths | git hash-object --stdin` ); - uncommittedHash = uncommittedHash.trim(); + const uncommittedHash = uncommittedHashWithPadding.trim(); // In case there are no uncommited changes (empty list), we always get this same hash. const noChangesHash = 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391';