java-diff-utils / java-diff-utils

Diff Utils library is an OpenSource library for performing the comparison / diff operations between texts or some kind of data: computing diffs, applying patches, generating unified diffs or parsing them, generating diff output for easy future displaying (like side-by-side view) and so on.

Home Page:https://java-diff-utils.github.io/java-diff-utils/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Requirement regarding conflict while applying a patch

BalaGanesa opened this issue · comments

Is there a way to resolve the conflict while applying a patch if not so could you please provide it.

commented

Using Patch.withConflictOutput you are able to process a failed patch. At the moment there are two variants available:

  • Patch.CONFLICT_PRODUCES_EXCEPTION: (default) throws an exception
  • Patch.CONFLICT_PRODUCES_MERGE_CONFLICT: produces git like merge conflict texts within the target file

So you are able to solve the conflict manually at this point implementing your own conflict handler.

Stale issue message