Skip to content

Commit

Permalink
Optimize getting object subtree
Browse files Browse the repository at this point in the history
Its removes one extra call of FindEntry
  • Loading branch information
dsxack committed Sep 23, 2023
1 parent 5e945ec commit b5de662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nodes/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (node *ObjectTreeNode) Lookup(ctx context.Context, name string, _ *fuse.Ent
return node.NewInode(ctx, NewFileNode(file, node.commit), fs.StableAttr{Mode: syscall.S_IFREG}), 0
}

tree, err := node.tree.Tree(name)
tree, err := object.GetTree(node.repository.Storer, entry.Hash)
if err != nil {
logger.Error("Error lookup object tree", slog.String("error", err.Error()))
return nil, syscall.ENOENT
Expand Down

0 comments on commit b5de662

Please sign in to comment.