-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
traverse-with-commitgraph #887
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In short, one should use the `Graph` to obtain the tools necessary for potentially accelerated, custom commit walks.
This is to more easily support custm graph walks later.
That way it's possible to either open the existing worktree index, or create one in-memory by turning our HEAD tree into an index on the fly.
…ence(). Many users of attributes will just need to know that.
…rmation. As part of the iteration, it will decode part of the commit and read parents and possibly the commit time if time-based sorting is desired. These values will now be made available instead of just the `id` of the commit. This saves the caller time to parse the commit again in case it needs similar information.
…king. That way, they can be more selectively used without pulling in all of `gix-revision`
…()` that also pops the key. This aligns the method name with `peek()`, which also pops the key.
…onky & rename `Sorting::Topological` to `Sorting::BreadthFirst`. This is now fixed by using a proven data structure, the `BinaryHeap` as priority queue. The rename is to differentiate `git log --topo-order` from what we are doing, which is actually quite different.
…commitgraph. That way, traversal speed is greatly improved for traversals that only need access to parents and commit time, while still being more efficient if it saves the caller to retrieve a commit again to parse it for parents.
…trolled via `revision::walk::Platform::use_commit_graph(toggle)`. The commitgraph is a data structure to greatly accelerate commit walks. It is now supported and used by default, but can be deactivated if desired. Further, add `Repository::commit_cache()` for direct access to just the commit-graph datastructure, without the extras provided by `gix_revision::Graph`.
THat's a better fix given its locaion in `gix-revision`, while differentiating it further from the lower-level `commit-graph`. Also rename `Repository::commit_cache()` to `::commit_graph()` now that the name is free.
…ommit once more.
…d`s. This enables re-use of information that was already obtained, like the parents of a commit and possibly its commit-time.
ee97bcc
to
af3608a
Compare
merged (with slightly different commits) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor
gix-traverse
commit walks to provide more information about the commits it seesand also support using the commitgraph for the same.
This can trickle up to
gix
which will yield certain information faster, naturally, without the need forspecialized walks for many cases, leveraging the features that are already present.
Tasks
gix-traverse
support for commitgraphsgix
iteration platformgix
uses newgix-traverse
API for commit walks and wraps these.Related to #853
Follow-up
Special-case for author-computation with commit-graph in
ein t h
. Only if one exists one (and we don't compute line/file changes), we can offload all work to a couple of threads.