René's URL Explorer Experiment


Title: fix(diff): read raw diff records field by field by Keerthana-64 · Pull Request #2292 · gitpython-developers/GitPython · GitHub

Open Graph Title: fix(diff): read raw diff records field by field by Keerthana-64 · Pull Request #2292 · gitpython-developers/GitPython

X Title: fix(diff): read raw diff records field by field by Keerthana-64 · Pull Request #2292 · gitpython-developers/GitPython

Description: Diff._handle_diff_line parsed git diff --raw -z output by splitting it at every NUL followed by a colon, and Diff._index_from_raw_format fed it one line of stdout at a time. With -z git writes paths verbatim, so both delimiters can occur inside a path. A path starting with : is parsed as metadata, the ValueError is raised inside the stdout pump thread, and the caller still gets a DiffIndex, with a pathless entry and every later entry missing: for a commit adding :planted, docs/b and setup.py, commit.diff(NULL_TREE) returned only [(None, 'A')]. A path containing a line feed is truncated there, and a colon after it starts a fabricated record: docs/a\n:100644 100644 111... 222... M came back as docs/a plus an M entry with blob ids taken from the file name. Paths are chosen by the commit author, so a tool that uses Commit.diff to see which files a commit touches can be made to miss changes. _index_from_raw_format now collects stdout before parsing, as _index_from_patch_format already does, and _handle_diff_line reads the NUL-separated fields in order: one metadata field, then one path, or two for copies and renames. A trailing line feed is still stripped, so the existing non--z fixtures parse as before. The new test in test/test_diff.py fails before the change and passes after it. ruff check, ruff format --check and mypy are clean. In a full clone the suite has 6 failures (test_diff_with_staged_file, test_index_mutation, test_empty_repo, test_rebasing and the two test_actor_get_uid_laziness_* tests), and all 6 also fail without this change.

Open Graph Description: Diff._handle_diff_line parsed git diff --raw -z output by splitting it at every NUL followed by a colon, and Diff._index_from_raw_format fed it one line of stdout at a time. With -z git writes path...

X Description: Diff._handle_diff_line parsed git diff --raw -z output by splitting it at every NUL followed by a colon, and Diff._index_from_raw_format fed it one line of stdout at a time. With -z git writes path...

Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/2292

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e91450ec-54a1-3100-9436-a87bed39dbb5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC992:BBAAA:4F398F:6A99C8:6B00CCD6
html-safe-noncef222eff8a01c1e64d25d82324d03645fa92fb4d4829a27d21e981bd067436fd4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTkyOkJCQUFBOjRGMzk4Rjo2QTk5Qzg6NkIwMENDRDYiLCJ2aXNpdG9yX2lkIjoiMzU1MjIyMzQ5Nzg5Nzk1NDUxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0de210ef90afa5b49162f79f2c26288670185069576166eb90fa5f24acf60978
hovercard-subject-tagpull_request:4903198661
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/2292/files
twitter:imagehttps://avatars.githubusercontent.com/u/304463654?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/304463654?s=400&v=4
og:image:altDiff._handle_diff_line parsed git diff --raw -z output by splitting it at every NUL followed by a colon, and Diff._index_from_raw_format fed it one line of stdout at a time. With -z git writes path...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None98dc00e171c204462a6f367482a0f8c3c6b5dbca99cd7390e82d2df49ce096e4
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseef013399cf0a3c324bea644a685d7c1e0f06b5b7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/pull/2292/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F2292%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F2292%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=gitpython-developers%2FGitPython
Reloadhttps://github.com/gitpython-developers/GitPython/pull/2292/files
Reloadhttps://github.com/gitpython-developers/GitPython/pull/2292/files
Reloadhttps://github.com/gitpython-developers/GitPython/pull/2292/files
gitpython-developershttps://github.com/gitpython-developers
GitPythonhttps://github.com/gitpython-developers/GitPython
Codehttps://github.com/gitpython-developers/GitPython
Issues1 (1)https://github.com/gitpython-developers/GitPython/issues
Pull requestshttps://github.com/gitpython-developers/GitPython/pulls
Discussionshttps://github.com/gitpython-developers/GitPython/discussions
Actionshttps://github.com/gitpython-developers/GitPython/actions
Security and quality42 (42)https://github.com/gitpython-developers/GitPython/security
Insightshttps://github.com/gitpython-developers/GitPython/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
Byronhttps://github.com/Byron
gitpython-developers:mainhttps://github.com/gitpython-developers/GitPython/tree/main
Keerthana-64:diff-raw-record-fieldshttps://github.com/Keerthana-64/GitPython/tree/diff-raw-record-fields
Conversation 2 https://github.com/gitpython-developers/GitPython/pull/2292
Commits 2 https://github.com/gitpython-developers/GitPython/pull/2292/commits
Checks 47 https://github.com/gitpython-developers/GitPython/pull/2292/checks
Files changed https://github.com/gitpython-developers/GitPython/pull/2292/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2292/files
fix(diff): read raw diff records field by field https://github.com/gitpython-developers/GitPython/pull/2292/files#top
Show all changes 2 commits https://github.com/gitpython-developers/GitPython/pull/2292/files
d8c0e7b fix(diff): read raw diff records field by field Keerthana-64 Oct 17, 2026 https://github.com/gitpython-developers/GitPython/pull/2292/commits/d8c0e7bdcd6bd2932c16c8c073833a9f88d78f3c
53df596 review Byron Oct 18, 2026 https://github.com/gitpython-developers/GitPython/pull/2292/commits/53df5960072f75a3dff4d9ac0ed91ba053da2050
Clear filters https://github.com/gitpython-developers/GitPython/pull/2292/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2292/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2292/files
diff.py https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
test_diff.py https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
git/diff.pyhttps://github.com/gitpython-developers/GitPython/pull/2292/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
View file https://github.com/Keerthana-64/GitPython/blob/53df5960072f75a3dff4d9ac0ed91ba053da2050/git/diff.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/2292/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
test/test_diff.pyhttps://github.com/gitpython-developers/GitPython/pull/2292/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
View file https://github.com/Keerthana-64/GitPython/blob/53df5960072f75a3dff4d9ac0ed91ba053da2050/test/test_diff.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/2292/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
https://github.com/gitpython-developers/GitPython/pull/2292/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2292/files
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.