-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add depth support for commits #889
Conversation
Results: []map[string]any{ | ||
{ | ||
// Composite head | ||
"cid": "bafybeiaxjhz6dna7fyf7tqo5hooilwvaezswd5xfsmb2lfgcy7tpzklikm", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These can be made more obvious once #852 is done
@@ -268,6 +268,8 @@ func (n *dagScanNode) Next() (bool, error) { | |||
return false, errors.New("Headset scan node returned an invalid cid") | |||
} | |||
n.currentCid = &cid | |||
// Reset the depthVisited for each head yielded by headset | |||
n.depthVisited = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was a hidden/logic bug that existed previously, however was never exposed as latestCommits has a mandatory docKey (for now :)) and thus only one head will have been yielded per node-instance where depth != 0 (commits previously only allowed infinite depth)
Codecov Report
@@ Coverage Diff @@
## develop #889 +/- ##
===========================================
+ Coverage 59.73% 59.76% +0.02%
===========================================
Files 157 157
Lines 17406 17420 +14
===========================================
+ Hits 10398 10411 +13
- Misses 6067 6068 +1
Partials 941 941
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Reset the depthVisited for each head * Add depth support to commits
Relevant issue(s)
Resolves #888
Description
Adds depth support for commits.