Skip to content

Use gitoxide for robust diffing #17

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 37 commits into from
Aug 28, 2022
Merged

Use gitoxide for robust diffing #17

merged 37 commits into from
Aug 28, 2022

Conversation

Byron
Copy link
Owner

@Byron Byron commented Aug 27, 2022

When done, fixes #16.

Tasks

  • reduced and stable index fixture which contains all states we have to deal with
  • test for additions, yanks and new versions (with existing engine)
  • test for normalization just showing the current diffing goes wrong as there should be no change.
  • see if existing fetch-tests can be refactored to use local test indices as stable file:// remote
  • assure there is no duplicate resource usage if git2 repo is held while a gitoxide repo is used for diffing
  • use gitoxide for diffing, without normalization
  • cleanup diffing, probably cleanup git-diff at least
  • make normalization work for gitoxide version of diff
  • release gitoxide

Then merge and create a PR in docs.rs with the version update.

It has updates, yanks, deletions, and normalization
Disable all failing tests, bring tests into one executable.
Byron added 26 commits August 27, 2022 13:35
The `index` module is now public for that reason.
That way the subtree can be recreated pretty easily
This greatly speeds up the usage of generated index repositories as
these are only extracted, not build with tons of git invocations.
Note that the remote-check has been removed to support all kinds of
indices.

Change-checks will fail later should it not be in the correct format
or an unrelated repo, so it should be fine.
no need to keep the worktree, all is bare
No need for crates.io checkout anymore
This comes with plenty of changes to the API of the
`last_seen_reference()` and to the lower-level methods that take
object ids (now `git::hash::ObjectId`.

Note that `git2` is still used internally for fetching and cloning.
This change was made to assure that at no time there are two open
repositories (once for git2, once for `gitoxide`), as this has the
potential to double resource usage for file handles.
@Byron Byron merged commit b7574d8 into main Aug 28, 2022
@Byron Byron deleted the semantic-stability branch August 28, 2022 10:22
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.

Gracefully handle semantically meaningless changes
1 participant