René's URL Explorer Experiment


Title: Exception suggestion: raise when making a Commit with non-commit binsha · Issue #2254 · gitpython-developers/GitPython · GitHub

Open Graph Title: Exception suggestion: raise when making a Commit with non-commit binsha · Issue #2254 · gitpython-developers/GitPython

X Title: Exception suggestion: raise when making a Commit with non-commit binsha · Issue #2254 · gitpython-developers/GitPython

Description: Consider the following code snippet: import git repo = git.Repo('GitPython') tag = repo.rev_parse('3.1.62') commit = git.Commit(repo, tag.binsha) index_file = git.IndexFile.new(repo, commit.tree) If GitPython is a repo in the CWD, then u...

Open Graph Description: Consider the following code snippet: import git repo = git.Repo('GitPython') tag = repo.rev_parse('3.1.62') commit = git.Commit(repo, tag.binsha) index_file = git.IndexFile.new(repo, commit.tree) I...

X Description: Consider the following code snippet: import git repo = git.Repo('GitPython') tag = repo.rev_parse('3.1.62') commit = git.Commit(repo, tag.binsha) index_file = git.IndexFile.new(repo...

Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/2254

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Exception suggestion: raise when making a Commit with non-commit binsha","articleBody":"Consider the following code snippet:\n\n```Python\nimport git\nrepo = git.Repo('GitPython')\ntag = repo.rev_parse('3.1.62')\ncommit = git.Commit(repo, tag.binsha)\nindex_file = git.IndexFile.new(repo, commit.tree)\n```\n\nIf `GitPython` is a repo in the CWD, then upon running the above code, you will see a traceback like so:\n\n```text\nTraceback (most recent call last):\n  File \"my_python_file.py\", line 5, in \u003cmodule>\n    index_file = git.IndexFile.new(repo, commit.tree)\n  File \"/usr/lib/python3.14/site-packages/git/index/base.py\", line 330, in new\n    base_entries = aggressive_tree_merge(repo.odb, tree_sha_bytes)\n  File \"/usr/lib/python3.14/site-packages/git/index/fun.py\", line 505, in aggressive_tree_merge\n    for entry in traverse_tree_recursive(odb, tree_shas[-1], \"\"):\n                 ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.14/site-packages/git/objects/fun.py\", line 271, in traverse_tree_recursive\n    data = tree_entries_from_data(odb.stream(tree_sha).read())\n  File \"/usr/lib/python3.14/site-packages/git/objects/fun.py\", line 111, in tree_entries_from_data\n    while data[i] != 0:\n          ~~~~^^^\nIndexError: index out of range\n\n```\n\nThis throws an out-of-bounds array index exception when trying to parse the tag's database stream as a tree, which *should* fail. However, the real user error occurred when trying to make a `Commit` object from a tag object's binsha: `commit = git.Commit(repo, tag.binsha)`. The `Commit` constructor should raise an Exception with a message to this effect. For example, \"Given sha value \u003cX> does not refer to a commit`. ","author":{"url":"https://github.com/jeffro256","@type":"Person","name":"jeffro256"},"datePublished":"2026-09-28T02:25:00Z","url":"https://github.com/gitpython-developers/GitPython/issues/2254"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9bafc6cb-f546-5da8-b441-d1a5ac33bc4c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC9B4:EDA7A:CBA59E:103A97C:6B0100BA
html-safe-nonce934b663e24bfaeed42f34a78ff118b40b26956bfdd52a9e8f373af7a4ed86573
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUI0OkVEQTdBOkNCQTU5RToxMDNBOTdDOjZCMDEwMEJBIiwidmlzaXRvcl9pZCI6IjcxNTUwNzY2ODY5NjEyNDYzOTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9bfb3ce1fec37a4df5d97ee1a5bb6c36403f331039d937a0de0ecd0485ceaf27
hovercard-subject-tagissue:5608420567
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/gitpython-developers/GitPython/2254/issue_layout
twitter:imagehttps://opengraph.githubassets.com/59705e56d467e2a921d3026852d89f622f588fd28b3433c62707c84e7f3a26e9/gitpython-developers/GitPython/issues/2254
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/59705e56d467e2a921d3026852d89f622f588fd28b3433c62707c84e7f3a26e9/gitpython-developers/GitPython/issues/2254
og:image:altConsider the following code snippet: import git repo = git.Repo('GitPython') tag = repo.rev_parse('3.1.62') commit = git.Commit(repo, tag.binsha) index_file = git.IndexFile.new(repo, commit.tree) I...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejeffro256
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/issues/2254#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fissues%2F2254
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%2Fissues%2F2254
Sign uphttps://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=gitpython-developers%2FGitPython
Reloadhttps://github.com/gitpython-developers/GitPython/issues/2254
Reloadhttps://github.com/gitpython-developers/GitPython/issues/2254
Reloadhttps://github.com/gitpython-developers/GitPython/issues/2254
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
https://github.com/gitpython-developers/GitPython
New issuehttps://github.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/2254
New issuehttps://github.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/2254
#2256https://github.com/gitpython-developers/GitPython/pull/2256
Exception suggestion: raise when making a Commit with non-commit binshahttps://github.com/gitpython-developers/GitPython/issues/2254#top
#2256https://github.com/gitpython-developers/GitPython/pull/2256
https://github.com/jeffro256
jeffro256https://github.com/jeffro256
on Sep 28, 2026https://github.com/gitpython-developers/GitPython/issues/2254#issue-5608420567
Byronhttps://github.com/Byron
on Sep 28, 2026https://github.com/gitpython-developers/GitPython/issues/2254#event-31972486662
fix: validate object types when loading binary SHAs (#2254)https://github.com/gitpython-developers/GitPython/commit/06104045e46be47fe791fd5f9498a6b15abf44c1
#2254https://github.com/gitpython-developers/GitPython/issues/2254
0610404https://github.com/gitpython-developers/GitPython/commit/06104045e46be47fe791fd5f9498a6b15abf44c1
https://github.com/Byron
Byronhttps://github.com/Byron
on Sep 28, 2026https://github.com/gitpython-developers/GitPython/issues/2254#issuecomment-5865668431
Byronhttps://github.com/Byron
on Sep 28, 2026https://github.com/gitpython-developers/GitPython/issues/2254#event-31986926880
fix: validate size lookups and preserve binary SHAs (#2254)https://github.com/gitpython-developers/GitPython/commit/7ed5433c04eb43ea67805e55710328e764027abc
#2254https://github.com/gitpython-developers/GitPython/issues/2254
7ed5433https://github.com/gitpython-developers/GitPython/commit/7ed5433c04eb43ea67805e55710328e764027abc
fix: validate size lookups and preserve binary SHAs (#2254)https://github.com/gitpython-developers/GitPython/commit/6bf77c0576937e35d8c40286d27dd86f12f5a3d1
#2254https://github.com/gitpython-developers/GitPython/issues/2254
6bf77c0https://github.com/gitpython-developers/GitPython/commit/6bf77c0576937e35d8c40286d27dd86f12f5a3d1
Byronhttps://github.com/Byron
completedhttps://github.com/gitpython-developers/GitPython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#2256https://github.com/gitpython-developers/GitPython/pull/2256
on Sep 28, 2026https://github.com/gitpython-developers/GitPython/issues/2254#event-31991100068
Sign up for freehttps://github.com/signup?return_to=https://github.com/gitpython-developers/GitPython/issues/2254
Sign in to commenthttps://github.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/2254
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.