Conversation
pmbittner
reviewed
Jun 11, 2025
Member
pmbittner
left a comment
There was a problem hiding this comment.
Thanks @ibbem! I greatly appreciate the additional simplifications and refactorings. Only some small comments. Can we be sure that these changes are indeed a refactoring? Do we have any tests that cover the behavior of the repository traversal?
src/main/java/org/variantsync/diffdetective/datasets/Repository.java
Outdated
Show resolved
Hide resolved
src/main/java/org/variantsync/diffdetective/datasets/Repository.java
Outdated
Show resolved
Hide resolved
src/main/java/org/variantsync/diffdetective/datasets/Repository.java
Outdated
Show resolved
Hide resolved
The `GitDiffer` class doesn't own (in the sense that the actual truth of these members lies in the `Repository` class) any of its members. Furthermore, it just bundles the same members as `Repository`, just leaving those out, that are unneeded. The constructor of `GitDiffer` even extracts these members from `Repository` and doesn't even allow them to be past any other way. Furthermore, most of the interesting functions are already static anyways. A different approach would be to move all of methods into `Repository`. However, there seems to be no reason to override any of the actual diffing methods and the drawback would be a huge `Repository` class which would serve a second purpose.
ad45412 to
58afdb5
Compare
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
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.
This fixes #153, makes
GitDifferstateless and does a few other small refactorings.