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

Eliminate static methods in RevisionReader #10130

Conversation

gerhardol
Copy link
Member

@gerhardol gerhardol commented Aug 4, 2022

Preparation for #5371
The end result is pushed to feature/i5371-stash-in-grid
For all stashes (not just the latest)
Not required for 4.0 but should be considered

image

Proposed changes

  • Eliminate static methods in RevisionReader
    Prepare RevisionReader for added functionality.
    Avoid passing class instance variable with every call.
    Parsing revisions may be improved by a milli second in best case.

  • Remove RevisionNodeFlags from data grid

Simplify (and a minor optimization) the code when loading revisions.
RevisionNodeFlags has information that is already available in the
GitRevisions, no need to pass that info again.

Set HasNotes after revisions are loaded, that is not required when
displaying a revision.

Test methodology

Tests are updated

Merge strategy

  • Rebase merge (PR submitter must change the commit message for the last commit).

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

@ghost ghost assigned gerhardol Aug 4, 2022
@gerhardol gerhardol force-pushed the feature/i5371-revision-reader-nostatic branch from 5d0379c to 3398a93 Compare August 8, 2022 20:05
@gerhardol
Copy link
Member Author

Rebased on #10129 (after multiple changes in master). Squashed the minor fixup.

@gerhardol gerhardol force-pushed the feature/i5371-revision-reader-nostatic branch from 3398a93 to c86f028 Compare August 31, 2022 22:43
@gerhardol gerhardol marked this pull request as ready for review August 31, 2022 22:46
Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Simplify (and a minor optimization) the code when loading revisions.
RevisionNodeFlags has information that is already available in the
GitRevisions, no need to pass that info again.

Set HasNotes after revisions are loaded, that is not required when
displaying a revisions.
@gerhardol gerhardol force-pushed the feature/i5371-revision-reader-nostatic branch from 5d65304 to 3c32f44 Compare September 3, 2022 15:31
@gerhardol gerhardol merged commit bbab8ab into gitextensions:master Sep 3, 2022
@gerhardol gerhardol deleted the feature/i5371-revision-reader-nostatic branch September 3, 2022 16:53
@ghost ghost added this to the vNext milestone Sep 3, 2022
gerhardol added a commit that referenced this pull request Sep 4, 2022
Simplify (and a minor optimization) the code when loading revisions.
RevisionNodeFlags has information that is already available in the
GitRevisions, no need to pass that info again.

Set HasNotes after revisions are loaded, that is not required when
displaying a revisions.

(cherry picked from commit bbab8ab)
@gerhardol gerhardol modified the milestones: vNext, 4.0.0 Sep 4, 2022
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