René's URL Explorer Experiment


Title: A config key written without a value is dropped, where git reads it as true · Issue #2237 · gitpython-developers/GitPython · GitHub

Open Graph Title: A config key written without a value is dropped, where git reads it as true · Issue #2237 · gitpython-developers/GitPython

X Title: A config key written without a value is dropped, where git reads it as true · Issue #2237 · gitpython-developers/GitPython

Description: GitConfigParser cannot read a key that appears with no =, which is valid git config and means true. [flag] enabled git config -f cfg --get flag.enabled -> exit 0, empty output git config -f cfg --type=bool --get flag.enabled -> true git ...

Open Graph Description: GitConfigParser cannot read a key that appears with no =, which is valid git config and means true. [flag] enabled git config -f cfg --get flag.enabled -> exit 0, empty output git config -f cfg --t...

X Description: GitConfigParser cannot read a key that appears with no =, which is valid git config and means true. [flag] enabled git config -f cfg --get flag.enabled -> exit 0, empty output git config -f cfg ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"A config key written without a value is dropped, where git reads it as true","articleBody":"`GitConfigParser` cannot read a key that appears with no `=`, which is valid git config and means true.\n\n```ini\n[flag]\n\tenabled\n```\n\n```\ngit config -f cfg --get flag.enabled              -> exit 0, empty output\ngit config -f cfg --type=bool --get flag.enabled  -> true\ngit config -f cfg --list                          -> flag.enabled\n```\n\n```python\n>>> GitConfigParser(\"cfg\", read_only=True).get_value(\"flag\", \"enabled\")\nNoOptionError\n```\n\nThe key is not stored at all. `OPTCRE` requires `[:=]`, so the line does not match, and the branch at `git/config.py:589-594` swallows it:\n\n```python\nelse:\n    # Check if it's an option with no value - it's just ignored by git.\n    if not self.OPTVALUEONLY.match(line):\n```\n\nThe comment is the part I would fix first regardless of the rest: git does not ignore it. `--list` shows the key and `--type=bool` reads it as true. `OPTVALUEONLY` exists only to recognise these lines so they can be discarded without raising a `ParsingError`.\n\nOne constraint on any fix, which is why I am asking rather than sending a patch. git distinguishes a valueless key from an empty one, and they differ exactly where it matters:\n\n```\n[f]\n\tnovalue        --get ''   --type=bool true\n\tempty =        --get ''   --type=bool false\n```\n\nSo storing `\"\"` for the valueless case would make it read as false, the opposite of git. Representing it needs something that `get_value` can render as `\"\"` while the boolean path reads as true.\n\nThere is also a write-back question: such a key is currently dropped on a read-modify-write, and once it parses it would need to be written back without an `=`.\n\nHappy to send the patch with tests if you tell me which representation you want; the write-back ripple is the reason I have not guessed.\n\nFound with git 2.50.1 and GitPython at a9913c7.\n\nAssisted-by: Claude Opus 5 (Claude Code), per the identification rule in CONTRIBUTING.md.","author":{"url":"https://github.com/rawsun007","@type":"Person","name":"rawsun007"},"datePublished":"2026-09-13T06:47:17Z","url":"https://github.com/gitpython-developers/GitPython/issues/2237"}

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:381f5816-9fd8-8601-d90b-984eced0ef2b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAC62:26ECEB:1018008:14A49CC:6B0100BA
html-safe-nonce971dce59ffd71ff392bca57d8e02a06050b8e28fe8434244e7178af75fb4b014
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzYyOjI2RUNFQjoxMDE4MDA4OjE0QTQ5Q0M6NkIwMTAwQkEiLCJ2aXNpdG9yX2lkIjoiNTYyMzczNDkzMzk4Mjg3MTczOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0d3030f5cd2786bf133beee004d955a3b0e6feb050d805127db18a415148e498
hovercard-subject-tagissue:5438582911
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/2237/issue_layout
twitter:imagehttps://opengraph.githubassets.com/db0e4930efad78d767e0b5ea3a7c2e3c1d4f7a7f21addf36eb540cb52b7a4214/gitpython-developers/GitPython/issues/2237
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/db0e4930efad78d767e0b5ea3a7c2e3c1d4f7a7f21addf36eb540cb52b7a4214/gitpython-developers/GitPython/issues/2237
og:image:altGitConfigParser cannot read a key that appears with no =, which is valid git config and means true. [flag] enabled git config -f cfg --get flag.enabled -> exit 0, empty output git config -f cfg --t...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerawsun007
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/2237#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fissues%2F2237
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%2F2237
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/2237
Reloadhttps://github.com/gitpython-developers/GitPython/issues/2237
Reloadhttps://github.com/gitpython-developers/GitPython/issues/2237
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/2237
New issuehttps://github.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/2237
#2238https://github.com/gitpython-developers/GitPython/pull/2238
A config key written without a value is dropped, where git reads it as truehttps://github.com/gitpython-developers/GitPython/issues/2237#top
#2238https://github.com/gitpython-developers/GitPython/pull/2238
https://github.com/rawsun007
rawsun007https://github.com/rawsun007
on Sep 13, 2026https://github.com/gitpython-developers/GitPython/issues/2237#issue-5438582911
a9913c7https://github.com/gitpython-developers/GitPython/commit/a9913c7685af569f6aa933c993d928ae64e3fb3e
Byronhttps://github.com/Byron
on Sep 13, 2026https://github.com/gitpython-developers/GitPython/issues/2237#event-31055888167
fix: preserve implicit boolean config keys (#2237)https://github.com/gitpython-developers/GitPython/commit/22296682d66fb0b2a76e549670d0ec6ef7447ab1
#2237https://github.com/gitpython-developers/GitPython/issues/2237
2229668https://github.com/gitpython-developers/GitPython/commit/22296682d66fb0b2a76e549670d0ec6ef7447ab1
Byronhttps://github.com/Byron
completedhttps://github.com/gitpython-developers/GitPython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#2238https://github.com/gitpython-developers/GitPython/pull/2238
on Sep 13, 2026https://github.com/gitpython-developers/GitPython/issues/2237#event-31056516210
Sign up for freehttps://github.com/signup?return_to=https://github.com/gitpython-developers/GitPython/issues/2237
Sign in to commenthttps://github.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/2237
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.