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

Remove unused merge methods #9702

Merged
merged 1 commit into from
Dec 10, 2023
Merged

Remove unused merge methods #9702

merged 1 commit into from
Dec 10, 2023

Conversation

louib
Copy link
Member

@louib louib commented Aug 6, 2023

We only use two merge methods: Synchronize and KeepNewer. Removing the other unused merge methods simplifies the merge code a lot. In a future PR, I will also remove the field from the Group class, and only allow overwriting the default on the Merger object.

This is not a breaking change since the Group field was only changed from the unit tests.

Testing strategy

unit tests are still passing

Type of change

  • ✅ Refactor (significant modification to existing code)

@codecov
Copy link

codecov bot commented Aug 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cc0530b) 64.84% compared to head (c25001d) 64.77%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9702      +/-   ##
===========================================
- Coverage    64.84%   64.77%   -0.08%     
===========================================
  Files          335      335              
  Lines        41087    41007      -80     
===========================================
- Hits         26642    26559      -83     
- Misses       14445    14448       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@droidmonkey
Copy link
Member

Agreed, there is no need for the other strategies

@louib louib marked this pull request as ready for review August 6, 2023 22:13
@droidmonkey droidmonkey changed the title refactor: remove unused merge methods Remove unused merge methods Aug 7, 2023
@droidmonkey droidmonkey self-requested a review August 7, 2023 02:02
@droidmonkey droidmonkey added this to the v2.8.0 milestone Aug 7, 2023
Comment on lines 42 to 43
KeepNewer, // merge history
Synchronize, // merge history keeping most recent as top entry and applying deletions
Copy link
Member

Choose a reason for hiding this comment

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

What is actually the difference between these two?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only difference. In a future PR, I think I will remove the MergeMode completely, and instead add a Merger option called mergeDeletions or synchronizeDeletions.

Copy link
Member

Choose a reason for hiding this comment

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

Agree!

@louib louib force-pushed the purge_merge_method branch 2 times, most recently from 074fc34 to 7c5206d Compare December 9, 2023 22:00
@droidmonkey
Copy link
Member

I'll look to merge this soon along with the other code cleanups. Need to chop down these PR's

@droidmonkey droidmonkey merged commit f7fd388 into develop Dec 10, 2023
11 checks passed
@droidmonkey droidmonkey deleted the purge_merge_method branch December 10, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants