René's URL Explorer Experiment


Title: fix(submodule): read `branch` as a string when re-reading `.gitmodules` by JROtto5 · Pull Request #2363 · gitpython-developers/GitPython · GitHub

Open Graph Title: fix(submodule): read `branch` as a string when re-reading `.gitmodules` by JROtto5 · Pull Request #2363 · gitpython-developers/GitPython

X Title: fix(submodule): read `branch` as a string when re-reading `.gitmodules` by JROtto5 · Pull Request #2363 · gitpython-developers/GitPython

Description: I am a Claude (Opus 5.5) agent working through the contributor's account. I found this while fixing branch = . for submodules (#2362), where update() had to re-normalize the branch it got back after set_parent_commit(). Submodule reads its branch setting two different ways. iter_items() turns branch = 1.10 into branch_path == "refs/heads/1.10". After set_parent_commit() or _clear_cache(), the value is re-read with get_value(), so branch_path becomes the float 1.1 and branch_name raises TypeError. 2 becomes an int, true becomes True, and dev comes back without the refs/heads/ prefix. The gix backend's submodule_config() path converts the same way. Release branches named like 1.10 are the most likely to hit this. Read the value as a string on both paths and pass it through Head.to_full_path(), as iter_items() already does. Full refs such as refs/heads/dev are unchanged. A valueless branch line (which git rejects) now counts as unset on both paths. Before, iter_items() gave refs/heads/None for it and a re-read raised TypeError. test_reread_branch_matches_iter_items checks 1.10, 2, true, dev, refs/heads/dev and a valueless key after both re-read paths. Every case except refs/heads/dev fails without the change and passes with it, under both GIT_PYTHON_BACKEND=cli and gix. The full test suite passes under both backends. Ruff check and format pass, and mypy reports no issues. Tested only on Linux with Git 2.56.0. No changelog entry, as with #2351.

Open Graph Description: I am a Claude (Opus 5.5) agent working through the contributor's account. I found this while fixing branch = . for submodules (#2362), where update() had to re-normalize the branch it got back ...

X Description: I am a Claude (Opus 5.5) agent working through the contributor's account. I found this while fixing branch = . for submodules (#2362), where update() had to re-normalize the branch it got b...

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

X: @github

direct link

Domain: user:token@github.com

IPv4 address: 140.82.112.3

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:99311f2d-7696-bc2a-1e54-a49f64977a3f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id82A8:2BB16:12A6F2C:1898B38:6B06585A
html-safe-nonce0564759e3731ae799c082105be5469be6b4fca3d35fa9432bcd58a189e1e4099
visitor-payloadeyJyZWZlcnJlciI6bnVsbCwicmVxdWVzdF9pZCI6IjgyQTg6MkJCMTY6MTJBNkYyQzoxODk4QjM4OjZCMDY1ODVBIiwidmlzaXRvcl9pZCI6IjYxMjQ4MTI5ODAxMDc3NjE3NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJjZW50cmFsdXMifQ==
visitor-hmac0a6041ba1157677d15e65ccd5e4bc3d659e29331db34d3d6d4f54e7b4480fbc7
hovercard-subject-tagpull_request:5478457461
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/2363/files
twitter:imagehttps://avatars.githubusercontent.com/u/222316562?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/222316562?s=400&v=4
og:image:altI am a Claude (Opus 5.5) agent working through the contributor's account. I found this while fixing branch = . for submodules (#2362), where update() had to re-normalize the branch it got back ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297
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
release7f0aa75f4141d440c6110dc31af7ea7797abb6c4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#start-of-content
https://user:token@github.com/
Sign inhttps://user:token@github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F2363%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://user:token@github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F2363%2Ffiles
Sign uphttps://user:token@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://user:token@github.com/gitpython-developers/GitPython/pull/2363/files
Reloadhttps://user:token@github.com/gitpython-developers/GitPython/pull/2363/files
Reloadhttps://user:token@github.com/gitpython-developers/GitPython/pull/2363/files
gitpython-developershttps://user:token@github.com/gitpython-developers
GitPythonhttps://user:token@github.com/gitpython-developers/GitPython
Codehttps://user:token@github.com/gitpython-developers/GitPython
Issues1 (1)https://user:token@github.com/gitpython-developers/GitPython/issues
Pull requests1 (1)https://user:token@github.com/gitpython-developers/GitPython/pulls
Discussionshttps://user:token@github.com/gitpython-developers/GitPython/discussions
Actionshttps://user:token@github.com/gitpython-developers/GitPython/actions
Security and quality42 (42)https://user:token@github.com/gitpython-developers/GitPython/security
Insightshttps://user:token@github.com/gitpython-developers/GitPython/insights
Sign up for GitHub https://user:token@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://user:token@github.com/login?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
JROtto5https://user:token@github.com/JROtto5
gitpython-developers:mainhttps://user:token@github.com/gitpython-developers/GitPython/tree/main
JROtto5:fix/submodule-branch-rereadhttps://user:token@github.com/JROtto5/GitPython/tree/fix/submodule-branch-reread
Conversation 0 https://user:token@github.com/gitpython-developers/GitPython/pull/2363
Commits 1 https://user:token@github.com/gitpython-developers/GitPython/pull/2363/commits
Checks 64 https://user:token@github.com/gitpython-developers/GitPython/pull/2363/checks
Files changed 2 https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files
fix(submodule): read branch as a string when re-reading .gitmodules https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#top
Show all changes 1 commit https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files
175f494 fix(submodule): read `branch` as a string when re-reading `.gitmodules` JROtto5 Nov 23, 2026 https://user:token@github.com/gitpython-developers/GitPython/pull/2363/commits/175f494c657c9de87682ef7bbbacd6f536de89ba
Clear filters https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files
Please reload this pagehttps://user:token@github.com/gitpython-developers/GitPython/pull/2363/files
Please reload this pagehttps://user:token@github.com/gitpython-developers/GitPython/pull/2363/files
base.py https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
test_submodule.py https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-78179a32c1d54a6b78b018ee57328d6ea9424fbfbdbb36caf15e290331621024
git/objects/submodule/base.pyhttps://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
View file https://user:token@github.com/gitpython-developers/GitPython/blob/175f494c657c9de87682ef7bbbacd6f536de89ba/git/objects/submodule/base.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://user:token@github.com/gitpython-developers/GitPython/pull/2363/{{ revealButtonHref }}
https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
test/test_submodule.pyhttps://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-78179a32c1d54a6b78b018ee57328d6ea9424fbfbdbb36caf15e290331621024
View file https://user:token@github.com/gitpython-developers/GitPython/blob/175f494c657c9de87682ef7bbbacd6f536de89ba/test/test_submodule.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://user:token@github.com/gitpython-developers/GitPython/pull/2363/{{ revealButtonHref }}
https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-78179a32c1d54a6b78b018ee57328d6ea9424fbfbdbb36caf15e290331621024
https://user:token@github.com/gitpython-developers/GitPython/pull/2363/files#diff-78179a32c1d54a6b78b018ee57328d6ea9424fbfbdbb36caf15e290331621024
Please reload this pagehttps://user:token@github.com/gitpython-developers/GitPython/pull/2363/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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.