summaryrefslogtreecommitdiffstats
path: root/modules/lfs
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-04-22 00:31:59 +0800
committerGitHub <noreply@github.com>2021-04-21 18:31:59 +0200
commit2255afffad4ff8173c73b7cec8dbd66d986eaf5c (patch)
tree92cd1967c9f264f1dd3016c512aea11fb37dfd39 /modules/lfs
parent9b8ffa1c7a886e3b550c64799463a5d4f965a2f7 (diff)
downloadgitea-2255afffad4ff8173c73b7cec8dbd66d986eaf5c.tar.gz
gitea-2255afffad4ff8173c73b7cec8dbd66d986eaf5c.zip
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>
Diffstat (limited to 'modules/lfs')
-rw-r--r--modules/lfs/pointer_scanner_nogogit.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/lfs/pointer_scanner_nogogit.go b/modules/lfs/pointer_scanner_nogogit.go
index 28d4afba61..b5654d5de7 100644
--- a/modules/lfs/pointer_scanner_nogogit.go
+++ b/modules/lfs/pointer_scanner_nogogit.go
@@ -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)