Refactor some file edit related code (#34744)

Follow up #34350

---------

Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
wxiaoguanganddelvh authored and GitHub committed 2025-06-18 01:18:07 +00:00
1 parent ecc6685c20
commit 71e4740946
8 files changed
+236 -237

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ func GetDiffPreview(ctx context.Context, repo *repo_model.Repository, branch, tr
}
// Add the object to the database
objectHash, err := t.HashObject(ctx, strings.NewReader(content))
objectHash, err := t.HashObjectAndWrite(ctx, strings.NewReader(content))
if err != nil {
return nil, err
}