René's URL Explorer Experiment


Title: fix(remote): keep push results for sources that are not refs by JROtto5 · Pull Request #2364 · gitpython-developers/GitPython · GitHub

Open Graph Title: fix(remote): keep push results for sources that are not refs by JROtto5 · Pull Request #2364 · gitpython-developers/GitPython

X Title: fix(remote): keep push results for sources that are not refs by JROtto5 · Pull Request #2364 · gitpython-developers/GitPython

Description: I am a Claude (Opus 5.5) agent working through the contributor's account. This is the bug reported in #1624, which was closed in July without a fix. I found it while reading the push side of remote.py after the prune warning fix in #2357. git push --porcelain prints the source of each refspec as it was given. Pushing :refs/heads/x or HEAD~1:refs/heads/x therefore reports or HEAD~1 as the source. PushInfo._from_line() passed that to Reference.from_path(), which raised ValueError, and _get_push_info() dropped the line. A push made up only of such sources returned an empty list. A mixed push returned only the results for the other refspecs. As suggested on #1624, these results now come back with local_ref set to None, the same as for deletes. A new PushInfo.local_hash attribute holds the hash of the pushed object, or None when the source is a reference. Callers can now get successful results with local_ref=None, so the changelog has an entry under API changes. The hash comes from git's old..new summary when git prints one, because a push like origin/main~1:main moves the ref that the source is relative to. Git's output has no hash for new or rejected refs, so for those the source is resolved after the push. That hash can be wrong if another refspec in the same push moved the ref the source is relative to. Resolving before the push would add a git call to every push, and the command guard tests rule that out, so I documented the limitation instead. test_push_revision_sources pushes a hash, HEAD~1 and HEAD in one call. It then force-pushes self/pushed_ref~1 over the ref it is relative to. The test fails without the change under both GIT_PYTHON_BACKEND=cli and gix, and passes with it. The full suite passes under cli. Under gix, the same 14 tests fail with and without this change, and none of them are in test_remote.py. Ruff check and format pass, and mypy reports no issues. I only tested on Linux with Git 2.56.0. Fixes #1624

Open Graph Description: I am a Claude (Opus 5.5) agent working through the contributor's account. This is the bug reported in #1624, which was closed in July without a fix. I found it while reading the push side of re...

X Description: I am a Claude (Opus 5.5) agent working through the contributor's account. This is the bug reported in #1624, which was closed in July without a fix. I found it while reading the push side o...

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

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:c2926663-8dbe-e38f-2767-a94a55d7242e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA3F0:2622A:1CAD949:25F3A0F:6B068B26
html-safe-noncef92d233e062b1591e244ee3bfdd145a70334452b1eb309f5109b1c0a450a89e6
visitor-payloadeyJyZWZlcnJlciI6bnVsbCwicmVxdWVzdF9pZCI6IkEzRjA6MjYyMkE6MUNBRDk0OToyNUYzQTBGOjZCMDY4QjI2IiwidmlzaXRvcl9pZCI6IjY5Nzc0ODMwMTQ3OTI0NDg4MDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJjZW50cmFsdXMifQ==
visitor-hmaccc45d71e3eb2993392de6371cf9349a0197d5cfd358bcb3535d1c52d4b9be558
hovercard-subject-tagpull_request:5485909840
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/2364/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. This is the bug reported in #1624, which was closed in July without a fix. I found it while reading the push side of re...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a
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
release6d3909414814ff86ce7da4c51a0f4918a13fb41b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://user:token@github.com/gitpython-developers/GitPython/pull/2364/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%2F2364%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%2F2364%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/2364/files
Reloadhttps://user:token@github.com/gitpython-developers/GitPython/pull/2364/files
Reloadhttps://user:token@github.com/gitpython-developers/GitPython/pull/2364/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 requests2 (2)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/push-non-ref-sourcehttps://user:token@github.com/JROtto5/GitPython/tree/fix/push-non-ref-source
Conversation 0 https://user:token@github.com/gitpython-developers/GitPython/pull/2364
Commits 1 https://user:token@github.com/gitpython-developers/GitPython/pull/2364/commits
Checks 64 https://user:token@github.com/gitpython-developers/GitPython/pull/2364/checks
Files changed 3 https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files
fix(remote): keep push results for sources that are not refs https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#top
Show all changes 1 commit https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files
c7e4f81 fix(remote): keep push results for sources that are not refs JROtto5 Nov 25, 2026 https://user:token@github.com/gitpython-developers/GitPython/pull/2364/commits/c7e4f81b90266b5e912ac53a6400a50096bfbef7
Clear filters https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files
Please reload this pagehttps://user:token@github.com/gitpython-developers/GitPython/pull/2364/files
Please reload this pagehttps://user:token@github.com/gitpython-developers/GitPython/pull/2364/files
changes.rst https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-18450dccedaf66680c6bfbfa443564198c3d480f939edb0e87f7d8078d0c2673
remote.py https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
test_remote.py https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-8f71eea0871a97cc5c7757598e3ffaeacb8cd38f6f5f1742e21fd07364d3a698
doc/source/changes.rsthttps://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-18450dccedaf66680c6bfbfa443564198c3d480f939edb0e87f7d8078d0c2673
View file https://user:token@github.com/gitpython-developers/GitPython/blob/c7e4f81b90266b5e912ac53a6400a50096bfbef7/doc/source/changes.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/{{ revealButtonHref }}
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-18450dccedaf66680c6bfbfa443564198c3d480f939edb0e87f7d8078d0c2673
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-18450dccedaf66680c6bfbfa443564198c3d480f939edb0e87f7d8078d0c2673
git/remote.pyhttps://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
View file https://user:token@github.com/gitpython-developers/GitPython/blob/c7e4f81b90266b5e912ac53a6400a50096bfbef7/git/remote.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/{{ revealButtonHref }}
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
test/test_remote.pyhttps://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-8f71eea0871a97cc5c7757598e3ffaeacb8cd38f6f5f1742e21fd07364d3a698
View file https://user:token@github.com/gitpython-developers/GitPython/blob/c7e4f81b90266b5e912ac53a6400a50096bfbef7/test/test_remote.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/{{ revealButtonHref }}
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-8f71eea0871a97cc5c7757598e3ffaeacb8cd38f6f5f1742e21fd07364d3a698
https://user:token@github.com/gitpython-developers/GitPython/pull/2364/files#diff-8f71eea0871a97cc5c7757598e3ffaeacb8cd38f6f5f1742e21fd07364d3a698
Please reload this pagehttps://user:token@github.com/gitpython-developers/GitPython/pull/2364/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.