mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Use the database object format name but not read from git repoisitory everytime and fix possible migration wrong objectformat when migrating a sha256 repository (#29294)
Now we can get object format name from git command line or from the database repository table. Assume the column is right, we don't need to read from git command line every time. This also fixed a possible bug that the object format is wrong when migrating a sha256 repository from external. <img width="658" alt="image" src="https://github.com/go-gitea/gitea/assets/81045/6e9a9dcf-13bf-4267-928b-6bf2c2560423">
This commit is contained in:
@ -388,7 +388,7 @@ func LFSFileFind(ctx *context.Context) {
|
||||
sha := ctx.FormString("sha")
|
||||
ctx.Data["Title"] = oid
|
||||
ctx.Data["PageIsSettingsLFS"] = true
|
||||
objectFormat, _ := ctx.Repo.GitRepo.GetObjectFormat()
|
||||
objectFormat := ctx.Repo.GetObjectFormat()
|
||||
var objectID git.ObjectID
|
||||
if len(sha) == 0 {
|
||||
pointer := lfs.Pointer{Oid: oid, Size: size}
|
||||
|
Reference in New Issue
Block a user