René's URL Explorer Experiment


Title: UnifiedDiffReader.parseUnifiedDiff(): Using unified diff with no prefix in file names leads to cut file names in some cases. · Issue #141 · java-diff-utils/java-diff-utils · GitHub

Open Graph Title: UnifiedDiffReader.parseUnifiedDiff(): Using unified diff with no prefix in file names leads to cut file names in some cases. · Issue #141 · java-diff-utils/java-diff-utils

X Title: UnifiedDiffReader.parseUnifiedDiff(): Using unified diff with no prefix in file names leads to cut file names in some cases. · Issue #141 · java-diff-utils/java-diff-utils

Description: Describe the bug When using an unified diff with no a/, b/ prefix in file names as input for UnifiedDiffReader.parseUnifiedDiff(), extracted file names are cut when they start with one of a, b, old new. This seems to be due to this piece...

Open Graph Description: Describe the bug When using an unified diff with no a/, b/ prefix in file names as input for UnifiedDiffReader.parseUnifiedDiff(), extracted file names are cut when they start with one of a, b, old...

X Description: Describe the bug When using an unified diff with no a/, b/ prefix in file names as input for UnifiedDiffReader.parseUnifiedDiff(), extracted file names are cut when they start with one of a, b, old...

Opengraph URL: https://github.com/java-diff-utils/java-diff-utils/issues/141

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"UnifiedDiffReader.parseUnifiedDiff(): Using unified diff with no prefix in file names leads to cut file names in some cases.","articleBody":"**Describe the bug**\r\nWhen using an unified diff with no a/, b/ prefix in file names as input for UnifiedDiffReader.parseUnifiedDiff(), extracted file names are cut when they start with one of a, b, old new. This seems to be due to this piece of code:\r\n```\r\nreturn line.substring(4).replaceFirst(\"^(a|b|old|new)(\\\\/)?\", \"\")\r\n                .trim();\r\n```\r\nwhich is located at UnifiedDiffReader::356 in a method called `extractFileName`.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Example data: Use an unified diff that contains at least one file whose name starts with \"a\", \"b\", \"old\" or \"new\".\r\nFor example:\r\n```\r\n--- a.txt\r\n+++ a1.txt\r\n@@ -8,7 +8,7 @@\r\n     \u003cSetting\u003e\r\n         \u003cSetting a\u003e\r\n             \u003csetting b\u003e\r\n-                \u003cvalue\u003e23\u003c/value\u003e\r\n+                \u003cvalue\u003e24\u003c/value\u003e\r\n             \u003c/setting b\u003e\r\n             \u003csetting c\u003e\r\n                 \u003cvalue\u003e1\u003c/value\u003e\r\n```\r\n2. simple program snippet\r\n```\r\nval diff = \"\"\"\r\n        --- a.txt\r\n        +++ a1.txt\r\n        @@ -8,7 +8,7 @@\r\n             \u003cSetting\u003e\r\n                 \u003cSetting a\u003e\r\n                     \u003csetting b\u003e\r\n        -                \u003cvalue\u003e23\u003c/value\u003e\r\n        +                \u003cvalue\u003e24\u003c/value\u003e\r\n                     \u003c/setting b\u003e\r\n                     \u003csetting c\u003e\r\n                         \u003cvalue\u003e1\u003c/value\u003e\r\n    \"\"\".trimIndent()\r\nval unifiedDiff = UnifiedDiffReader.parseUnifiedDiff(diff.byteInputStream())\r\nunifiedDiff.files.forEach { unifiedDiffFile -\u003e\r\n                println(unifiedDiffFile.fromFile)\r\n                println(unifiedDiffFile.toFile)\r\n}\r\n```\r\n3. See error\r\n\r\nThis snipet prints:\r\n```\r\n.txt\r\n1.txt\r\n```\r\n**Expected behavior**\r\nThe snippet should print:\r\n```\r\na.txt\r\na1.txt\r\n```\r\n\r\n**System**\r\n - Java version 11\r\n - Version 4.11\r\n","author":{"url":"https://github.com/IgnacioGarcia198","@type":"Person","name":"IgnacioGarcia198"},"datePublished":"2022-01-11T09:09:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/141/java-diff-utils/issues/141"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c4933d90-9203-a024-787b-277914a2f5f3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD064:3053B5:11B11D:180FA0:6969648F
html-safe-nonce2c3b8dc9c890f7af6d3657963637333e55bcac0010950e64b7a6c067c00a9dd6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDY0OjMwNTNCNToxMUIxMUQ6MTgwRkEwOjY5Njk2NDhGIiwidmlzaXRvcl9pZCI6IjE4NDM2MjE2NTQyNDM2NjUwMzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd34a7c0571a20550364faf98519b35d09111efac50091c96aefa82c27b063a6e
hovercard-subject-tagissue:1098885536
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/java-diff-utils/java-diff-utils/141/issue_layout
twitter:imagehttps://opengraph.githubassets.com/937a424a101873388b8725763f22bbe47ef376f53499bd5ffa762f6ba69d932a/java-diff-utils/java-diff-utils/issues/141
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/937a424a101873388b8725763f22bbe47ef376f53499bd5ffa762f6ba69d932a/java-diff-utils/java-diff-utils/issues/141
og:image:altDescribe the bug When using an unified diff with no a/, b/ prefix in file names as input for UnifiedDiffReader.parseUnifiedDiff(), extracted file names are cut when they start with one of a, b, old...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameIgnacioGarcia198
hostnamegithub.com
expected-hostnamegithub.com
None48487c1ad776a7975b7132d95f4240ff3ae37cd5b8e3cb597102a4edb76738f1
turbo-cache-controlno-preview
go-importgithub.com/java-diff-utils/java-diff-utils git https://github.com/java-diff-utils/java-diff-utils.git
octolytics-dimension-user_id40540835
octolytics-dimension-user_loginjava-diff-utils
octolytics-dimension-repository_id86663812
octolytics-dimension-repository_nwojava-diff-utils/java-diff-utils
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id86663812
octolytics-dimension-repository_network_root_nwojava-diff-utils/java-diff-utils
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release669463fcc54773a88c1f5a44eef6b99a5504b9c7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/java-diff-utils/java-diff-utils/issues/141#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjava-diff-utils%2Fjava-diff-utils%2Fissues%2F141
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjava-diff-utils%2Fjava-diff-utils%2Fissues%2F141
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=java-diff-utils%2Fjava-diff-utils
Reloadhttps://github.com/java-diff-utils/java-diff-utils/issues/141
Reloadhttps://github.com/java-diff-utils/java-diff-utils/issues/141
Reloadhttps://github.com/java-diff-utils/java-diff-utils/issues/141
java-diff-utils https://github.com/java-diff-utils
java-diff-utilshttps://github.com/java-diff-utils/java-diff-utils
Please reload this pagehttps://github.com/java-diff-utils/java-diff-utils/issues/141
Notifications https://github.com/login?return_to=%2Fjava-diff-utils%2Fjava-diff-utils
Fork 215 https://github.com/login?return_to=%2Fjava-diff-utils%2Fjava-diff-utils
Star 1.5k https://github.com/login?return_to=%2Fjava-diff-utils%2Fjava-diff-utils
Code https://github.com/java-diff-utils/java-diff-utils
Issues 1 https://github.com/java-diff-utils/java-diff-utils/issues
Pull requests 1 https://github.com/java-diff-utils/java-diff-utils/pulls
Discussions https://github.com/java-diff-utils/java-diff-utils/discussions
Actions https://github.com/java-diff-utils/java-diff-utils/actions
Projects 0 https://github.com/java-diff-utils/java-diff-utils/projects
Wiki https://github.com/java-diff-utils/java-diff-utils/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/java-diff-utils/java-diff-utils/security
Please reload this pagehttps://github.com/java-diff-utils/java-diff-utils/issues/141
Insights https://github.com/java-diff-utils/java-diff-utils/pulse
Code https://github.com/java-diff-utils/java-diff-utils
Issues https://github.com/java-diff-utils/java-diff-utils/issues
Pull requests https://github.com/java-diff-utils/java-diff-utils/pulls
Discussions https://github.com/java-diff-utils/java-diff-utils/discussions
Actions https://github.com/java-diff-utils/java-diff-utils/actions
Projects https://github.com/java-diff-utils/java-diff-utils/projects
Wiki https://github.com/java-diff-utils/java-diff-utils/wiki
Security https://github.com/java-diff-utils/java-diff-utils/security
Insights https://github.com/java-diff-utils/java-diff-utils/pulse
New issuehttps://github.com/login?return_to=https://github.com/java-diff-utils/java-diff-utils/issues/141
New issuehttps://github.com/login?return_to=https://github.com/java-diff-utils/java-diff-utils/issues/141
UnifiedDiffReader.parseUnifiedDiff(): Using unified diff with no prefix in file names leads to cut file names in some cases.https://github.com/java-diff-utils/java-diff-utils/issues/141#top
https://github.com/IgnacioGarcia198
https://github.com/IgnacioGarcia198
IgnacioGarcia198https://github.com/IgnacioGarcia198
on Jan 11, 2022https://github.com/java-diff-utils/java-diff-utils/issues/141#issue-1098885536
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.