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

Change detection using git "three dot" diff #35

Merged
merged 17 commits into from
Sep 1, 2020
Merged

Conversation

dorny
Copy link
Owner

@dorny dorny commented Sep 1, 2020

Git provides "two" and "three" dots diffs

  • two dots: changes between two arbitrary commits
  • three dots: finds merge-base (common ancestor) and diffs against it.

Previously only "two dots" diff was used.
This caused troubles when diffing against the base branch. Changes introduced by newer commits on the base branch were detected while they should be ignored.

This PR fixes this by introducing on-demand fetching of history and then using "three dots" diff to detect changes made only on the current branch. Documentation will be updated in separate PR before releasing next version.

Fixes #33

Previous implementation performed simple diff between two versions. New implementation fetches on demand more commits to have the merge base between two branches. Now it will detect only changes introduced by branch that was pushed, instead of mixing with changes introduced meanwhile on the base branch.
@dorny dorny added this to the v2.3.0 milestone Sep 1, 2020
@dorny dorny self-assigned this Sep 1, 2020
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