From 9a8781f46adf49291ce4e552416084d9fe1a6c9b Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:59:30 -0500 Subject: [PATCH] fix(git): print faulty line on parsing error --- git/log.ts | 30 +++++++++++++++++------------- git/log_test.ts | 4 ++++ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/git/log.ts b/git/log.ts index 7166a4c..c7d38bb 100644 --- a/git/log.ts +++ b/git/log.ts @@ -13,19 +13,23 @@ export function log(sha: string, { stdout = "", ...options } = {} as LogOptions) // Parse entries let entries = [] for (const line of stdout.trim().split("\n")) { - const { sha, author, time, summary } = line.match(/^<<(?.{40})>> <<(?