Skip to content

Conversation

DustinTheDev
Copy link

@DustinTheDev DustinTheDev commented Sep 25, 2025

This pull request adds support for the new ZDiff3 merge conflict file strategy in LibGit2Sharp addressing #1976, alongside updates to enable and test this functionality. The changes include extending enums and internal flags, updating the mapping logic, and introducing a new test repository and test case to verify the behavior.

Feature: ZDiff3 Conflict File Strategy Support

  • Added ZDiff3 option to the CheckoutFileConflictStrategy enum to support zealous diff3 conflict file formatting.
  • Introduced the corresponding internal checkout and merge flags (GIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3 and GIT_MERGE_FILE_STYLE_ZDIFF3) to enable the new strategy at the core level. [1] [2]
  • Updated the mapping logic in CheckoutStrategyFromFileConflictStrategy to handle the new ZDiff3 strategy.

Testing: New Repository and Test Case

  • Added a new test repository (mergeconflict_testrepo_wd) and supporting files to facilitate testing of merge conflict scenarios with different file strategies.
  • Implemented a new test method CanSpecifyMergeConflictFileStrategy in MergeFixture.cs to verify that the merge conflict file strategies (Merge, Diff3, ZDiff3) produce the expected file outputs.

@DustinTheDev DustinTheDev changed the title Add support for ZDiff3 (#1976) Add support for ZDiff3 Sep 25, 2025
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