Deepen shallow clones before running diff #27
Merged
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.
If the cloned repository is not deep enough (cloned with --depth N), the change_in evaluation fails.
In this PR, we are introducing a procedure for an iterative deepening of the git history until change_in is ready to be resolved.
Demonstrative pseudocode:
We are running with an iterative approach instead of a full clone in order to better support large git repositories. For example, a full git clone can be 80gb, but the relevant parts (the last N commits) might be much lighter.
The iterative deepening will halt with an error at 10,000 commits. This should be enough for most, if not all use cases.
When this change is introduced, the output of the CLI will be: