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

Update to directly use git to calculate changes for diffs #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jackbentley
Copy link

Fixes #72

I'm not primarily a Java/Kotlin developer so this took some time to figure out. There's might be some mistakes and there might well be a better way of doing this.

I know that these changes won't be compatible with the feature that allows you to select which commits to review from the MR. This will now only allow you to compare the source and target branch.

From what I can gather the plugin currently calculates the changes by combining the changeset of the commits in the MR.

For example, if the two branches are updated simultaneously and merged together, you will end up seeing the changes from the target branch/merge commit in the diff.

This isn't the same as a git diff.

The changes I've made make it the exact equivalent of running git diff <target>..<source> (because it actually runs that command).

Given that it now runs the commit command, it means it's obviously only compatible with Git but I don't think that's an issue as other parts of the plugin are tailored to git only.

In order to re-implement the "select commits to compare" feature, you will likely need to use the merge-base command as explained here or find another way of doing what the MR does.

@nhat-phan nhat-phan self-assigned this Jul 22, 2020
@nhat-phan
Copy link
Owner

Thanks for contribution, based on this I'll fix a commits problem add add new option in the configuration, then users have a choice to pick between 2 methods.

@Nico04
Copy link

Nico04 commented Oct 16, 2020

Any news on this MR ?

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.

Wrong file revisions are taken in code review
3 participants