-
-
Notifications
You must be signed in to change notification settings - Fork 346
git-repository diff API #535
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
Conversation
This file contains hidden or 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
…#470) Even though the empty-tree object can be found when searched via `Repository::find_object()`, previously it was not locatable when used during rev-spec parsing.
…e. (#470) This is a first and maybe the last step towards providing diffing functionality, and it seems like the right choice to keep this in similar and contribute there as needed. All algorithms are well described and thus shouldn't be git-specific per-se, and `similar` is the best the community has to offer.
…mmit ancestor iteration. (#470) This is useful to avoid additional lookups of the same object for reading additional data from it. Currently one needs an object cache to avoid duplciate object extraction work, with such a cache being slower than accessing the same buffer again.
…ut consumption. (#470) This is useful if these provide additional out-of-band information.
…thor. (#470) Note that these are expensive and unconditionally use threads to speed up these computations.
This allows path conversions there to be just as efficient as on unix. This was adopted from [a PR in the hexlix-editor](https://github.com/helix-editor/helix/pull/3890/files#diff-504515b66023120e75a921cd56a932aed76c0ff62593fbb69d92e0ef65089501R47).
The disadvantage of doing that is that we copy the name, which allocates, instead of just returning it by reference.
It's very common to try to work with trees, so let's make that easier.
But for some reason, the counter stays at 0 despite sharing the counter stat.
Finally, issues due to bugs in prodash.
Even though failing is cheap, it's not free and can be done a million times.
…line-stats`. (#470) That way more information is generated at increasingly high costs.
…). (#470) We assume unguessable ones are a plain text file, like one without extension.
…actor v0.12.0, git-glob v0.4.0, git-path v0.5.0, git-quote v0.3.0, git-attributes v0.4.0, git-config-value v0.8.0, git-tempfile v2.0.5, git-validate v0.6.0, git-object v0.21.0, git-ref v0.16.0, git-sec v0.4.0, git-config v0.8.0, git-discover v0.5.0, git-traverse v0.17.0, git-index v0.5.0, git-worktree v0.5.0, git-testtools v0.9.0, git-command v0.1.0, git-prompt v0.1.0, git-url v0.9.0, git-credentials v0.5.0, git-diff v0.19.0, git-mailmap v0.4.0, git-chunk v0.3.2, git-pack v0.23.0, git-odb v0.33.0, git-packetline v0.13.0, git-transport v0.20.0, git-protocol v0.20.0, git-revision v0.5.0, git-refspec v0.2.0, git-repository v0.24.0, git-commitgraph v0.9.0, gitoxide-core v0.18.0, gitoxide v0.16.0, safety bump 28 crates SAFETY BUMP: git-actor v0.12.0, git-attributes v0.4.0, git-config-value v0.8.0, git-object v0.21.0, git-ref v0.16.0, git-sec v0.4.0, git-config v0.8.0, git-discover v0.5.0, git-traverse v0.17.0, git-index v0.5.0, git-worktree v0.5.0, git-testtools v0.9.0, git-command v0.1.0, git-prompt v0.1.0, git-url v0.9.0, git-credentials v0.5.0, git-diff v0.19.0, git-mailmap v0.4.0, git-pack v0.23.0, git-odb v0.33.0, git-transport v0.20.0, git-protocol v0.20.0, git-revision v0.5.0, git-refspec v0.2.0, git-repository v0.24.0, gitoxide-core v0.18.0, gitoxide v0.16.0, git-pathspec v0.1.0
…edentials v0.5.0, git-diff v0.19.0, git-mailmap v0.4.0, git-chunk v0.3.2, git-pack v0.23.0, git-odb v0.33.0, git-packetline v0.13.0, git-transport v0.20.0, git-protocol v0.20.0, git-revision v0.5.0, git-refspec v0.2.0, git-repository v0.24.0, git-commitgraph v0.9.0, gitoxide-core v0.18.0, gitoxide v0.16.0
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.
Now that it becomes clearer what to expect from diffing, we can go ahead and provide a high-level
API that can be used by
crates-index-diff
and byein tool hours
as well.It should provide basic integration with
git-diff
, which for now is probably now more than atype-based wrapper for
similar
.Tasks
git-repository
git-diff
and Myers algorithmcrates-index-diff
to that version ofgit-repository
, for now in a branchein tool hours --stats
to get line-stats per authorcrates-index-diff
to use and new release of the latter.lookup_path()
.Out of scope