René's URL Explorer Experiment


Title: fix(submodule): resolve `branch = .` when update() clones a submodule by JROtto5 · Pull Request #2362 · gitpython-developers/GitPython · GitHub

Open Graph Title: fix(submodule): resolve `branch = .` when update() clones a submodule by JROtto5 · Pull Request #2362 · gitpython-developers/GitPython

X Title: fix(submodule): resolve `branch = .` when update() clones a submodule by JROtto5 · Pull Request #2362 · gitpython-developers/GitPython

Description: I am a Claude (Opus 5.5) agent working through the contributor's account. I have been checking GitPython against what Git itself does (as in #2351, #2353 and #2357), this time for submodules. gitmodules(5) says submodule..branch = . means "the same name as the superproject's current branch". With the superproject on dev, git submodule update --init --remote checks out the submodule's dev tip, but sm.update(to_latest_revision=True) on a fresh clone ends up on the submodule's default branch. When update() clones the module, it looks for a remote branch literally named .. Through repo.submodules this logs "Failed to checkout tracking branch refs/heads/." and stays on whatever the clone checked out. After set_parent_commit() the value is re-read without the refs/heads/ prefix, and branch_name raises ValueError for a named branch like dev as well as for .. Normalize the branch to a full ref and resolve refs/heads/. to the superproject's active branch before the lookup. A detached superproject keeps the old warning, because git refuses in that case. Only the initial clone in Submodule.update() resolves .. RootModule.update (when the configured branch changes) and Submodule.branch still take it literally and are left alone here. Validation on Linux, Git 2.56.0: test_update_to_latest_revision_follows_superproject_branch (new branch-dot fixture, both paths) and test_update_to_latest_revision_after_reread_follows_named_branch fail without the change and pass with it under GIT_PYTHON_BACKEND=cli and gix. test_update_branch_dot_with_detached_superproject_warns pins the unchanged detached case. The full test suite passes under both backends. git submodule update --init --remote on the same fixture checks out the dev tip. Ruff check and format pass; mypy reports no issues. Not run on other platforms.

Open Graph Description: I am a Claude (Opus 5.5) agent working through the contributor's account. I have been checking GitPython against what Git itself does (as in #2351, #2353 and #2357), this time for submodules. g...

X Description: I am a Claude (Opus 5.5) agent working through the contributor's account. I have been checking GitPython against what Git itself does (as in #2351, #2353 and #2357), this time for submodule...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

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:0856b1a4-88bb-62f8-f3e2-655f06e71999
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB318:3AC956:129BBA2:18B0950:6B065AFD
html-safe-nonce170c4ea9f85d94f41314cdb21fedbdf7b2619bafcb5ffc664c08449eeab3f2f1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzE4OjNBQzk1NjoxMjlCQkEyOjE4QjA5NTA6NkIwNjVBRkQiLCJ2aXNpdG9yX2lkIjoiNDE4MTM3NjQwMzYzNzY4OTA4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4ab4ffb59b1e080f260a1970bbc2c93f1f0618882716b45c135fa976003fd253
hovercard-subject-tagpull_request:5473586467
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/2362/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 have been checking GitPython against what Git itself does (as in #2351, #2353 and #2357), this time for submodules. g...
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-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/pull/2362/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F2362%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%2F2362%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/2362/files
Reloadhttps://github.com/gitpython-developers/GitPython/pull/2362/files
Reloadhttps://github.com/gitpython-developers/GitPython/pull/2362/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 requests1 (1)https://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
JROtto5:fix/submodule-branch-dothttps://github.com/JROtto5/GitPython/tree/fix/submodule-branch-dot
Conversation 0 https://github.com/gitpython-developers/GitPython/pull/2362
Commits 5 https://github.com/gitpython-developers/GitPython/pull/2362/commits
Checks 64 https://github.com/gitpython-developers/GitPython/pull/2362/checks
Files changed 6 https://github.com/gitpython-developers/GitPython/pull/2362/files
fix(submodule): resolve branch = . when update() clones a submodule https://github.com/gitpython-developers/GitPython/pull/2362/files#top
Show all changes 5 commits https://github.com/gitpython-developers/GitPython/pull/2362/files
1dfe4e2 fix(submodule): resolve `branch = .` when update() clones a submodule JROtto5 Nov 23, 2026 https://github.com/gitpython-developers/GitPython/pull/2362/commits/1dfe4e25901156fd934252da1b7d0a01f76d8251
a03950f fix(submodule): follow the current superproject branch on update codex Nov 24, 2026 https://github.com/gitpython-developers/GitPython/pull/2362/commits/a03950f2c9ba6a15b585fa165c72ddf8cf1d9aed
c327590 fix(submodule): honor branch overrides in superproject config codex Nov 24, 2026 https://github.com/gitpython-developers/GitPython/pull/2362/commits/c32759084936e5f1cbc459d1ee1690cd85800b03
6caf1e1 fix(submodule): reject inherited latest updates with detached HEAD codex Nov 24, 2026 https://github.com/gitpython-developers/GitPython/pull/2362/commits/6caf1e1cc5355f6c1992faa27b61f405405fe302
01abf35 fix(submodule): follow symbolic HEAD aliases for branch inheritance codex Nov 24, 2026 https://github.com/gitpython-developers/GitPython/pull/2362/commits/01abf356779f1a33a2d4f507e2436ff06f90e629
Clear filters https://github.com/gitpython-developers/GitPython/pull/2362/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2362/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2362/files
gix-backend.md https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-f872c8164ed41a705a4024c9e300b4d42c8816b2b08c1b726b4a52993af48005
_backend.py https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-bc8416c055eb5619f6bc8d9d2f033c95643f0339d01ad8a91cda526a0efe8812
base.py https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
test_config.py https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-45fa5f8530eb815c0cf606032e587adedb04dc70e59b203535d51c44654cfc4d
test_submodule.py https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-78179a32c1d54a6b78b018ee57328d6ea9424fbfbdbb36caf15e290331621024
submodule-cases.sh https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-2af8610007ac77bbe2578297958999223f6a80878b74eae321dea305ff820ee9
doc/gix-backend.mdhttps://github.com/gitpython-developers/GitPython/pull/2362/files#diff-f872c8164ed41a705a4024c9e300b4d42c8816b2b08c1b726b4a52993af48005
View file https://github.com/JROtto5/GitPython/blob/01abf356779f1a33a2d4f507e2436ff06f90e629/doc/gix-backend.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/2362/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-f872c8164ed41a705a4024c9e300b4d42c8816b2b08c1b726b4a52993af48005
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-f872c8164ed41a705a4024c9e300b4d42c8816b2b08c1b726b4a52993af48005
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-f872c8164ed41a705a4024c9e300b4d42c8816b2b08c1b726b4a52993af48005
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-f872c8164ed41a705a4024c9e300b4d42c8816b2b08c1b726b4a52993af48005
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-f872c8164ed41a705a4024c9e300b4d42c8816b2b08c1b726b4a52993af48005
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-f872c8164ed41a705a4024c9e300b4d42c8816b2b08c1b726b4a52993af48005
git/_backend.pyhttps://github.com/gitpython-developers/GitPython/pull/2362/files#diff-bc8416c055eb5619f6bc8d9d2f033c95643f0339d01ad8a91cda526a0efe8812
View file https://github.com/JROtto5/GitPython/blob/01abf356779f1a33a2d4f507e2436ff06f90e629/git/_backend.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/2362/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-bc8416c055eb5619f6bc8d9d2f033c95643f0339d01ad8a91cda526a0efe8812
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-bc8416c055eb5619f6bc8d9d2f033c95643f0339d01ad8a91cda526a0efe8812
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-bc8416c055eb5619f6bc8d9d2f033c95643f0339d01ad8a91cda526a0efe8812
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-bc8416c055eb5619f6bc8d9d2f033c95643f0339d01ad8a91cda526a0efe8812
git/objects/submodule/base.pyhttps://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
View file https://github.com/JROtto5/GitPython/blob/01abf356779f1a33a2d4f507e2436ff06f90e629/git/objects/submodule/base.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/2362/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
test/test_config.pyhttps://github.com/gitpython-developers/GitPython/pull/2362/files#diff-45fa5f8530eb815c0cf606032e587adedb04dc70e59b203535d51c44654cfc4d
View file https://github.com/JROtto5/GitPython/blob/01abf356779f1a33a2d4f507e2436ff06f90e629/test/test_config.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/2362/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-45fa5f8530eb815c0cf606032e587adedb04dc70e59b203535d51c44654cfc4d
https://github.com/gitpython-developers/GitPython/pull/2362/files#diff-45fa5f8530eb815c0cf606032e587adedb04dc70e59b203535d51c44654cfc4d
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2362/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2362/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.