Fix commit file status parser (#30602) (#30606)

Backport #30602 by wxiaoguang

Try to fix  #30492

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot 2024-04-19 23:16:02 +08:00 committed by GitHub
parent 79484e1cb7
commit 08822651a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ func parseCommitFileStatus(fileStatus *CommitFileStatus, stdout io.Reader) {
_, _ = rd.Discard(1) _, _ = rd.Discard(1)
} }
for { for {
modifier, err := rd.ReadSlice('\x00') modifier, err := rd.ReadString('\x00')
if err != nil { if err != nil {
if err != io.EOF { if err != io.EOF {
log.Error("Unexpected error whilst reading from git log --name-status. Error: %v", err) log.Error("Unexpected error whilst reading from git log --name-status. Error: %v", err)