From 53cf46cae7475befa2dde554bbd9147e436072b9 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 --- 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 5f442b0e1..d96cef37c 100644 --- a/modules/git/commit.go +++ b/modules/git/commit.go @@ -468,7 +468,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)