Title: issues when parsing git diff · Issue #79 · java-diff-utils/java-diff-utils · GitHub
Open Graph Title: issues when parsing git diff · Issue #79 · java-diff-utils/java-diff-utils
X Title: issues when parsing git diff · Issue #79 · java-diff-utils/java-diff-utils
Description: Describe the bug When parsing git diff like this diff --git a/test/Issue.java b/test/Issue.java new file mode 100644 index 00000000..9702606e UnifiedDiffReader will throw UnifiedDiffParserException: "expected file start line not found" I...
Open Graph Description: Describe the bug When parsing git diff like this diff --git a/test/Issue.java b/test/Issue.java new file mode 100644 index 00000000..9702606e UnifiedDiffReader will throw UnifiedDiffParserException...
X Description: Describe the bug When parsing git diff like this diff --git a/test/Issue.java b/test/Issue.java new file mode 100644 index 00000000..9702606e UnifiedDiffReader will throw UnifiedDiffParserException...
Opengraph URL: https://github.com/java-diff-utils/java-diff-utils/issues/79
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"issues when parsing git diff","articleBody":"**Describe the bug**\r\n1. When parsing git diff like this \r\n``` diff\r\ndiff --git a/test/Issue.java b/test/Issue.java\r\nnew file mode 100644\r\nindex 00000000..9702606e\r\n```\r\nUnifiedDiffReader will throw UnifiedDiffParserException: \"expected file start line not found\"\r\nI have analyze the code and found that `new file mode 100644` can't not be recognized. But I found regex that can recognized this line in comment of method `UnifiedDiffReader#parse()` \r\n ```\r\n // schema = [[/^\\s+/, normal], [/^diff\\s/, start], [**/^new file mode \\d+$/**, new_file], \r\n```\r\nIt seems that you intend not to recognize this, Could you please tell the reason?\r\n\r\n\r\n2. The java.util.logging.Logger in UnifiedDiffReader is kind of chatty, How should I turn it off.\r\n\r\n3. Is `UnifiedDiffUtils.parseUnifiedDiff()` designed to only parse the first patch?\r\n","author":{"url":"https://github.com/luyijingxiu","@type":"Person","name":"luyijingxiu"},"datePublished":"2020-05-21T02:43:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/79/java-diff-utils/issues/79"}
| 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:38460d4f-644d-f1e8-5194-a37483d40d18 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A38A:3AEC12:DAB003:12AF584:69693AE1 |
| html-safe-nonce | e6ae06dc0121209b52b8dd306279682417ea2c361e93aea99d569670ca109fcd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzhBOjNBRUMxMjpEQUIwMDM6MTJBRjU4NDo2OTY5M0FFMSIsInZpc2l0b3JfaWQiOiIxMTA1NDQ4MDgxODAxNDI3NjgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 45094b7a161d1c10ff1e3a043f291bc528446a647ad70450f4903650178a59cb |
| hovercard-subject-tag | issue:622206318 |
| 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/79/issue_layout |
| twitter:image | https://opengraph.githubassets.com/47a19879bdaf7e11c332af8adf762aa6e89ed7ee76bba7a28de7e0a830d1eca4/java-diff-utils/java-diff-utils/issues/79 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/47a19879bdaf7e11c332af8adf762aa6e89ed7ee76bba7a28de7e0a830d1eca4/java-diff-utils/java-diff-utils/issues/79 |
| og:image:alt | Describe the bug When parsing git diff like this diff --git a/test/Issue.java b/test/Issue.java new file mode 100644 index 00000000..9702606e UnifiedDiffReader will throw UnifiedDiffParserException... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | luyijingxiu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| 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 | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width