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

range-diff: Incorrect limit when selecting four commits #8952

Merged
merged 2 commits into from Mar 11, 2021

Conversation

gerhardol
Copy link
Member

Candidate for 3.5

Proposed changes

  • range-diff: Incorrect limit when selecting four commits

Git diff-range can be used to show the difference in 'slices' of branches.
This is advanced usage, my normal usage is just to select two heads.
But if you select baseA, A, baseB, B then range-diff shows the difference between the commits,
(see example after, just with one commit in each 'slice').
This is helpful in comparing a patchset in two separate branches (master and release for instance).

range-diff can be slow with many commits and is limited to 100 commit differences.
This calculation was incorrect and did not count the differences but the union for the "base" and the "head" why the command was normally refused.
With this, also a routine in GitModule could be removed.

  • FileStatusList: avoid getRevision() for index commits

Just avoid some CPU cycles

  • rev-list, merge-base: Avoid Git call when arguments are identical

No need to invoke Git in these situations, even if the commands are cached.

Screenshots

Before

image

After

image

Test methodology

manual


✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned gerhardol Mar 7, 2021
@gerhardol
Copy link
Member Author

With #8923, the check in diffCalculator can be removed as the request no longer blocks the UI.
I still would like to merge this PR, also for 3.5.

@gerhardol
Copy link
Member Author

@msftbot merge

@gerhardol gerhardol merged commit bffea66 into gitextensions:master Mar 11, 2021
@ghost ghost added this to the 3.6 milestone Mar 11, 2021
@gerhardol gerhardol deleted the feature/range-diff-rev-list branch March 11, 2021 14:36
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.

None yet

3 participants