Skip to content

commit-graph: Introduce git_commit_graph_needs_refresh() #5764

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

Merged
merged 3 commits into from
Mar 4, 2021

Conversation

lhchavez
Copy link
Contributor

@lhchavez lhchavez commented Jan 7, 2021

This change introduces a function that allows the caller to know whether
the commit-graph file has not been modified since it was parsed.

Part of: #5757

@lhchavez lhchavez mentioned this pull request Jan 7, 2021
8 tasks
@lhchavez lhchavez force-pushed the cgraph-needs-refresh branch from 46f89e5 to adaaffc Compare January 7, 2021 04:54
Base automatically changed from master to main January 7, 2021 10:10
@lhchavez lhchavez force-pushed the cgraph-needs-refresh branch 2 times, most recently from 9ff8b42 to 54af31f Compare January 10, 2021 04:55
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
This change introduces a function that allows the caller to know whether
the `commit-graph` file has not been modified since it was parsed.

Part of: libgit2#5757
@lhchavez lhchavez force-pushed the cgraph-needs-refresh branch from 54af31f to 1a2f960 Compare January 10, 2021 21:28
@ethomson
Copy link
Member

ethomson commented Mar 4, 2021

🎉

@ethomson ethomson merged commit d7e6509 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