mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
f74c869221
Fixes the reason why #29101 is hard to replicate.
Related #29297
Create a repo with a file with minimum size 4097 bytes (I use 10000) and
execute the following code:
```go
gitRepo, err := gitrepo.OpenRepository(db.DefaultContext, <repo>)
assert.NoError(t, err)
commit, err := gitRepo.GetCommit(<sha>)
assert.NoError(t, err)
entry, err := commit.GetTreeEntryByPath(<file>)
assert.NoError(t, err)
b := entry.Blob()
// Create a reader
r, err := b.DataAsync()
assert.NoError(t, err)
defer r.Close()
// Create a second reader
r2, err := b.DataAsync()
assert.NoError(t, err) // Should be no error but is ErrNotExist
defer r2.Close()
```
The problem is the check in `CatFileBatch`:
|
11 months ago | |
---|---|---|
.. | ||
e2e | 1 year ago | |
fuzz | 1 year ago | |
gitea-lfs-meta | 2 years ago | |
gitea-repositories-meta | 1 year ago | |
integration | 11 months ago | |
testdata/data/attachments/a/0 | 1 year ago | |
mssql.ini.tmpl | 1 year ago | |
mysql.ini.tmpl | 1 year ago | |
pgsql.ini.tmpl | 1 year ago | |
sqlite.ini.tmpl | 1 year ago | |
test_utils.go | 1 year ago |