From 27434acef6e8077133d875cec2da318b56a10d20 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 19 Apr 2024 22:41:03 +0800 Subject: [PATCH] Fix commit file status parser (#30602) Try to fix #30492 (cherry picked from commit 53cf46cae7475befa2dde554bbd9147e436072b9) --- modules/git/commit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/git/commit.go b/modules/git/commit.go index 00681e3b2f..b5ae2e0e52 100644 --- a/modules/git/commit.go +++ b/modules/git/commit.go @@ -462,7 +462,7 @@ func parseCommitFileStatus(fileStatus *CommitFileStatus, stdout io.Reader) { _, _ = rd.Discard(1) } for { - modifier, err := rd.ReadSlice('\x00') + modifier, err := rd.ReadString('\x00') if err != nil { if err != io.EOF { log.Error("Unexpected error whilst reading from git log --name-status. Error: %v", err)