Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Isn't https://github.com/DigiLive/jQuery-Merge-for-php-diff the solution to 3 way diff, or has it to be done in this lib?

You must be logged in to vote

Replies: 1 comment

Comment options

The repo you're referring to, is also a 2-way diff which uses the php-diff library to determine the differences and utilizes javascript to provide some kind of GUI.

3-way diff is a comparison between 3 files.
It would be a nice addition to this library, but I'm not quite sure this would take changes in the current code-base or if it will take additional code (classes) to execute multiple 2-way diffs between the 3 files and combine the results.

Lets say we have 3 files next to each other...
Instead of Added, Deleted, and Changed blocks (as in file comparison like the lib does now), there are now Matching, Non-Matching, and Conflict blocks.

  • In a Matching block, the left and right files both differ from the center file, but are themselves equal. In other words, the same change from base was made in "theirs" and "yours".

  • In a Non-Matching block, either the left or right file differs from the center file, but not both. In other words, the change was only made in one file.

  • In a Conflict block, the left and right files both differ from the center files and are not equal to one other. In other words, different changes from base were made in "theirs" and "yours". Conflicts must be manually resolved by the user.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.