Fix panic when get editor config file (#36241)

Fix #36239
This commit is contained in:
Lunny Xiao
2025-12-25 19:26:23 -08:00
committed by GitHub
parent 776e406363
commit ff3d68b98a
5 changed files with 29 additions and 52 deletions
+3 -8
View File
@@ -53,14 +53,9 @@ func (te *TreeEntry) Size() int64 {
// Blob returns the blob object the entry
func (te *TreeEntry) Blob() *Blob {
encodedObj, err := te.ptree.repo.gogitRepo.Storer.EncodedObject(plumbing.AnyObject, te.toGogitTreeEntry().Hash)
if err != nil {
return nil
}
return &Blob{
ID: te.ID,
gogitEncodedObj: encodedObj,
name: te.Name(),
ID: te.ID,
repo: te.ptree.repo,
name: te.Name(),
}
}