[not intended for merging] experiment: use git diff in blob_changes
#2343
+219
−72
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.
This is an experiment that’s supposed to help me validate the
gix-blamealgorithm.gix-blamecurrently rests on two foundations: 1. is the algorithm that traverses a file’s history and keeps track of blamed and unblamed hunks. 2. is the algorithm used for diffing subsequent states of a file throughout its history. Basically, (1.) orchestratesgix-blame, using (2.) to do most of the work of following individual lines throughout a file’s history.gix-blamecurrently doesn’t matchgit blamein all cases, but we set out to change that in #2308 as we expect most people to wantgix-blameto matchgit blame’s output.Since the algorithm used for (2.) differs from the one used by
git, it has been somewhat challenging to validate (1.) on a large scale as it is quite hard to tell whether a divergence betweengix-blameandgit blameis due to differences in (1.) or (2.). This PR tries to approach this issue from a different angle, substitutinggix-diffin (2.) by just shelling out togit diff. That way, it hopefully becomes much easier to comparegix-blameusinggix-diffvs.gix-blameusinggit diffvs.git blameon the scale of entire repositories.I’m opening this PR mostly to get CI feedback and to make this work visible. We probably can close it once I’m done with it.