Skip to content

Commit d0701fd

Browse files
committed
fix: handle pipe characters in commit messages
Fixes bug where commit messages containing pipe characters would be truncated during parsing, causing undefined message property and toLowerCase() errors in get_quality_metrics tool.
1 parent 0a6d439 commit d0701fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/git-metrics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export function parseCommitData(output: string) {
8888
const author = parts[1] || "";
8989
const email = parts[2] || "";
9090
const date = parts[3] || "";
91-
const message = parts[4] || "";
91+
const message = parts.slice(4).join("|") || "";
9292
current = { hash, author, email, date, message, files: [] };
9393
} else if (line.match(/^\d+\s+\d+/) && current) {
9494
const parts = line.split(/\s+/);

0 commit comments

Comments
 (0)