Skip to content
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

commit-graph: Support lookups of entries in a commit-graph #5763

Merged
merged 2 commits into from
Mar 4, 2021

Conversation

lhchavez
Copy link
Contributor

@lhchavez lhchavez commented Jan 7, 2021

This change introduces git_commit_graph_entry_find() and
git_commit_graph_entry_parent(). These two functions allow a much
faster lookup of commits by ID, since the ODB does not need to be
consulted, the commit object does not need to be inflated, and the
contents of the commit object do not need to be parsed.

Part of: #5757

This change is the first in a series to add support for git's
commit-graph. This should speed up commit graph traversals by avoiding
object parsing and allowing some operations to terminate earlier.

Part of: libgit2#5757
This change introduces `git_commit_graph_entry_find()` and
`git_commit_graph_entry_parent()`. These two functions allow a much
faster lookup of commits by ID, since the ODB does not need to be
consulted, the commit object does not need to be inflated, and the
contents of the commit object do not need to be parsed.

Part of: libgit2#5757
@ethomson
Copy link
Member

ethomson commented Mar 4, 2021

Woo, commit graphs, very exciting! 🎉

@ethomson ethomson merged commit b99b5a8 into libgit2:main Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants