Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Support for fuzzy patches #112

Closed
@dpoetzsch

Description

@dpoetzsch

When generating a unified diff with context, I would like to be able to do a fuzzy apply of that patch. Does your library support this?

For example, take the following unified diff with context 3:

--- original+++ modified@@ -2,6 +2,9 @@ 2 3 4+a+b+c 5 6 7

And my file looks like the following (exactly the original but with three lines added to the top):

xyz12345678

Using the linuxpatch tool I am still able to apply this patch:

$ patch -o - neworig udiff.patchpatching file - (read from neworig)Hunk #1 succeeded at 5 with fuzz 1 (offset 3 lines).

When usingDiffUtils.patch of your library I get an error (because the line numbers no longer match):

Incorrect Chunk: the chunk content doesn't match the target

Maybe there is a configuration option to enable fuzzy patching?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp