Skip to content

Commit fe31f79

Browse files
committed
Consolidated find/parent scanning functions
An interesting observation about the find and parent scanning functions is that at their core, they're both actually doing the same operation. They search a metadata-pair during fetch for an entry uses the entry data instead of the entry tag. This means we can combine these functions and get a decent code savings. It's a little bit trickier because pair ordering isn't guaranteed. But to work around that we can simply search for both pair orderings. It's a bit more expensive but may be worth the code savings. A fancier implementation in the future can avoid the 2x lfs_parent scans.
1 parent fd121dc commit fe31f79

File tree

1 file changed

+94
-200
lines changed

1 file changed

+94
-200
lines changed

0 commit comments

Comments
 (0)