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

Start gitoxide migration #69

Merged
merged 11 commits into from
Dec 30, 2024
Merged

Start gitoxide migration #69

merged 11 commits into from
Dec 30, 2024

Conversation

Notgnoshi
Copy link
Owner

@Notgnoshi Notgnoshi commented Dec 29, 2024

See #62. The idea is that gitoxide is under active development, and is advertised as being fast, so I want to switch to it.

This is partly motivated by speed, and partly by struggling to work with git2's diff API (I also couldn't figure out gix's, so that's not a completely justified reason to migrate).

I have not yet decided if I want to build parallel implementations, or migrate the existing APIs over to gix. (Implement the git2 APIs in terms of gix with a translation shim).

So instead, this PR is focused on filling in some gaps that I noticed in another branch starting to do some migration. Of particular note is the fetch/pull tests. Switching fetch to gix revealed some shortcomings in my own understanding, the test coverage, and not necessarily a 1-1 mapping between git2 and gix's fetch APIs.

My plan is to migrate from git2 to gix because gix is under active
development, and has more potential to support the features I want. It's
also advertised as fast, which is a project goal.
They're not that slow, with nextest, the whole test run is still under
1sec for all tests.
Note that while rev::parse could potentially be implemented in terms of
rev::parse_gix, rev::walk cannot, because the iterator holds a reference
to the repository. So before rev::walk can be converted, the whole call
graph from main() need to switch over to gix top-down (or play more
sophisticated games)
This allows more easily retrieving the commit message, author, hash,
etc. details for use in tests.
This will allow testing fetching and pulling with file:// clone URLs,
which results in faster tests and more flexibility than using the
upstream GitHub herostratus remote in integration tests.
@Notgnoshi Notgnoshi merged commit a747482 into main Dec 30, 2024
6 checks passed
@Notgnoshi Notgnoshi deleted the dev branch December 30, 2024 17:51
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.

1 participant