commit-graph: Introduce `git_commit_graph_needs_refresh()` by lhchavez · Pull Request #5764 · libgit2/libgit2 · GitHub
Skip to content

commit-graph: Introduce git_commit_graph_needs_refresh()#5764

Merged
ethomson merged 3 commits into
libgit2:mainfrom
lhchavez:cgraph-needs-refresh
Mar 4, 2021
Merged

commit-graph: Introduce git_commit_graph_needs_refresh()#5764
ethomson merged 3 commits into
libgit2:mainfrom
lhchavez:cgraph-needs-refresh

Conversation

@lhchavez

@lhchavez lhchavez commented Jan 7, 2021

Copy link
Copy Markdown
Contributor

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

ethomson commented Mar 4, 2021

Copy link
Copy Markdown
Member

@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