Browse Source

Prevent NPE on empty commit (#16812)

tags/v1.16.0-rc1
zeripath 4 years ago committed by GitHub
parent
commit
e891d68dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      modules/git/log_name_status.go

3
modules/git/log_name_status.go

@ -167,6 +167,9 @@ func (g *LogNameStatusRepoParser) Next(treepath string, paths2ids map[string]int
return nil, err
}
}
if len(g.next) == 0 {
return &ret, nil
}
if g.next[0] == '\x00' {
g.buffull = false
g.next, err = g.rd.ReadSlice('\x00')

Loading…
Cancel
Save