Fix lfs management find (#15537)

Fix #15236

* Do not do 40byte conversion within ParseTreeLine
* Missed a to40ByteSHA

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
Lunny Xiao 2021-04-22 00:31:59 +08:00 committed by GitHub
parent 9b8ffa1c7a
commit 2255afffad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View file

@ -11,6 +11,7 @@ import (
"context"
"io"
"strconv"
"strings"
"sync"
"code.gitea.io/gitea/modules/git"
@ -78,6 +79,7 @@ loop:
_ = catFileBatchReader.CloseWithError(err)
break
}
sha = strings.TrimSpace(sha)
// Throw away the blob
if _, err := bufferedReader.ReadString(' '); err != nil {
_ = catFileBatchReader.CloseWithError(err)