From a81ff6643c1042f4168318b375e63e60cbb4a45e Mon Sep 17 00:00:00 2001 From: orca-bug-scan-bot Date: Sun, 31 May 2026 12:10:01 -0700 Subject: [PATCH] fix: address pr-bug-scan validated finding from #4299 Removed comma-split fallback in parseGitDecorationRefs; always splits on \x1f. Single comma-containing ref no longer shatters at the comma. --- src/shared/git-history-log-parser.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/shared/git-history-log-parser.ts b/src/shared/git-history-log-parser.ts index cfda6a2b4ab..cabc40f3f70 100644 --- a/src/shared/git-history-log-parser.ts +++ b/src/shared/git-history-log-parser.ts @@ -22,11 +22,7 @@ function parseGitDecorationRefs(raw: string, revision: string): GitHistoryItemRe const refs: GitHistoryItemRef[] = [] // Why: Git permits commas in ref names, so Orca's git log format uses a // control-character separator that Git ref names cannot contain. - const parts = raw.includes(GIT_HISTORY_DECORATION_SEPARATOR) - ? raw.split(GIT_HISTORY_DECORATION_SEPARATOR) - : raw.split(',') - - for (const part of parts) { + for (const part of raw.split(GIT_HISTORY_DECORATION_SEPARATOR)) { const ref = part.trim() if (!ref || ref === 'HEAD' || /^refs\/remotes\/[^/]+\/HEAD(?:\s|$)/.test(ref)) { continue