From 878740ea6c90d1deccc35ce6a70294af5f04e480 Mon Sep 17 00:00:00 2001 From: Simon Whitaker Date: Sun, 2 Jun 2024 22:22:31 +0100 Subject: [PATCH] Fix rendering of git commits with bodies in the History Inspector --- CodeEdit/Features/Git/Client/GitClient+CommitHistory.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CodeEdit/Features/Git/Client/GitClient+CommitHistory.swift b/CodeEdit/Features/Git/Client/GitClient+CommitHistory.swift index a9c5c60bd..929a437ff 100644 --- a/CodeEdit/Features/Git/Client/GitClient+CommitHistory.swift +++ b/CodeEdit/Features/Git/Client/GitClient+CommitHistory.swift @@ -31,14 +31,14 @@ extension GitClient { dateFormatter.dateFormat = "EEE, dd MMM yyyy HH:mm:ss Z" let output = try await run( - "log --pretty=%h¦%H¦%s¦%aN¦%ae¦%cn¦%ce¦%aD¦%b¦%D¦ \(maxCountString) \(branchNameString) \(fileLocalPath)" + "log -z --pretty=%h¦%H¦%s¦%aN¦%ae¦%cn¦%ce¦%aD¦%b¦%D¦ \(maxCountString) \(branchNameString) \(fileLocalPath)" .trimmingCharacters(in: .whitespacesAndNewlines) ) let remote = try await run("ls-remote --get-url") let remoteURL = URL(string: remote.trimmingCharacters(in: .whitespacesAndNewlines)) return output - .split(separator: "\n") + .split(separator: "\0") .map { line -> GitCommit in let parameters = String(line).components(separatedBy: "¦") let infoRef = parameters[safe: 9]