Title: Support for fuzzy patches · Issue #112 · java-diff-utils/java-diff-utils · GitHub
Open Graph Title: Support for fuzzy patches · Issue #112 · java-diff-utils/java-diff-utils
X Title: Support for fuzzy patches · Issue #112 · java-diff-utils/java-diff-utils
Description: 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 @...
Open Graph Description: 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: ...
X Description: 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: ...
Opengraph URL: https://github.com/java-diff-utils/java-diff-utils/issues/112
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support for fuzzy patches","articleBody":"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?\r\n\r\nFor example, take the following unified diff with context 3:\r\n\r\n```\r\n--- original\r\n+++ modified\r\n@@ -2,6 +2,9 @@\r\n 2\r\n 3\r\n 4\r\n+a\r\n+b\r\n+c\r\n 5\r\n 6\r\n 7\r\n```\r\n\r\nAnd my file looks like the following (exactly the original but with three lines added to the top):\r\n\r\n```\r\nx\r\ny\r\nz\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n```\r\n\r\nUsing the linux `patch` tool I am still able to apply this patch:\r\n\r\n```\r\n$ patch -o - neworig udiff.patch\r\npatching file - (read from neworig)\r\nHunk #1 succeeded at 5 with fuzz 1 (offset 3 lines).\r\n```\r\n\r\nWhen using `DiffUtils.patch` of your library I get an error (because the line numbers no longer match):\r\n\r\n```\r\nIncorrect Chunk: the chunk content doesn't match the target\r\n```\r\n\r\nMaybe there is a configuration option to enable fuzzy patching?","author":{"url":"https://github.com/dpoetzsch","@type":"Person","name":"dpoetzsch"},"datePublished":"2021-01-12T11:14:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/112/java-diff-utils/issues/112"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:13a9e795-838f-20d1-c8d2-891aa827ad12 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3F0:2A2892:1F2989D:2BE7FF7:69690A43 |
| html-safe-nonce | ab3b4208f3c0f2968afcd0ddb6534372c9912af36bd79a57926699182534f55e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0YwOjJBMjg5MjoxRjI5ODlEOjJCRTdGRjc6Njk2OTBBNDMiLCJ2aXNpdG9yX2lkIjoiNjM5NTYxOTAzMDM5NDgwMDcwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 726c5f69a9e2a03c5445b122d7f8523a2f6694a9b237345977a388d6a298d704 |
| hovercard-subject-tag | issue:784143255 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/java-diff-utils/java-diff-utils/112/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2df84dad071e2074f5d431b7fdc448607d64c2763297200344a2bb4aee1d540a/java-diff-utils/java-diff-utils/issues/112 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2df84dad071e2074f5d431b7fdc448607d64c2763297200344a2bb4aee1d540a/java-diff-utils/java-diff-utils/issues/112 |
| og:image:alt | 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: ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dpoetzsch |
| hostname | github.com |
| expected-hostname | github.com |
| None | e6156bd4ef9f2dc8dadf4c49a8f7ed8532186388cef72eda3ccb9f0ab3b8cfca |
| turbo-cache-control | no-preview |
| go-import | github.com/java-diff-utils/java-diff-utils git https://github.com/java-diff-utils/java-diff-utils.git |
| octolytics-dimension-user_id | 40540835 |
| octolytics-dimension-user_login | java-diff-utils |
| octolytics-dimension-repository_id | 86663812 |
| octolytics-dimension-repository_nwo | java-diff-utils/java-diff-utils |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 86663812 |
| octolytics-dimension-repository_network_root_nwo | java-diff-utils/java-diff-utils |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ee2210c3e58153aae53400c942f8a7b4bbb43ec4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width