René's URL Explorer Experiment


Title: fix(check): expand env vars in --rev-range by bearomorphism · Pull Request #2005 · commitizen-tools/commitizen · GitHub

Open Graph Title: fix(check): expand env vars in --rev-range by bearomorphism · Pull Request #2005 · commitizen-tools/commitizen

X Title: fix(check): expand env vars in --rev-range by bearomorphism · Pull Request #2005 · commitizen-tools/commitizen

Description: Description Fix regression where the packaged commitizen-branch pre-push hook stopped working after v4.15.0. The hook passes the literal .. as a single argv element. Before #1941 the surrounding shell=True expanded the env vars; after #1941 (CWE-78 hardening) git receives the literal string and aborts with fatal: ambiguous argument. Fix: expand env vars on the --rev-range argument via os.path.expandvars in Check.__init__. Unset vars are left literal so git can surface a clear error rather than silently rewriting the range to empty. Closes #2003. Credit to @j178 for the root-cause analysis. Checklist I have read the contributing guidelines Was generative AI tooling used to co-author this PR? Yes (please specify the tool below) Generated-by: GitHub Copilot CLI following the guidelines Code Changes Add test cases to all the changes you introduce Run uv run poe all locally to ensure this change passes linter check and tests Manually test the changes Update the documentation for the changes (N/A -- no user-facing CLI change) Expected Behavior cz check --rev-range "$VAR1..$VAR2" resolves env vars before invoking git log, matching the pre-#1941 contract that the packaged hook relied on. Steps to Test This Pull Request git init repro && cd repro git commit --allow-empty -m "feat: first" git commit --allow-empty -m "fix: second" export PRE_COMMIT_FROM_REF=$(git rev-parse HEAD~1) export PRE_COMMIT_TO_REF=$(git rev-parse HEAD) cz check --rev-range "$PRE_COMMIT_FROM_REF..$PRE_COMMIT_TO_REF" Before: fatal: ambiguous argument (exit 23). After: Commit validation: successful!. New automated coverage in tests/commands/test_check_command.py: two unit tests plus test_check_rev_range_pre_commit_branch_hook_regression -- an E2E test against a real git repo that reproduces the exact issue error when the fix is reverted.

Open Graph Description: Description Fix regression where the packaged commitizen-branch pre-push hook stopped working after v4.15.0. The hook passes the literal .. as a single argv element. Before #1941 the surrounding sh...

X Description: Description Fix regression where the packaged commitizen-branch pre-push hook stopped working after v4.15.0. The hook passes the literal .. as a single argv element. Before #1941 the surrounding sh...

Opengraph URL: https://github.com/commitizen-tools/commitizen/pull/2005

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0480c732-dc5a-65f3-8789-361e2717244f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDDB8:3ED847:CD4397:12EBCB5:6A4E2A45
html-safe-nonce08bd25e71da715848cc009993e0dc9d327571b2864247756e04a43fe0e94123c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEREI4OjNFRDg0NzpDRDQzOTc6MTJFQkNCNTo2QTRFMkE0NSIsInZpc2l0b3JfaWQiOiI4MjU3MjY2MzIxMzIzODYyNTk3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacfff5d244014c28ab1e7ebe362d38f0207d56609493fe85621ae1e0cb0c7dff25
hovercard-subject-tagpull_request:3772834665
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/commitizen-tools/commitizen/pull/2005/files
twitter:imagehttps://avatars.githubusercontent.com/u/26526132?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/26526132?s=400&v=4
og:image:altDescription Fix regression where the packaged commitizen-branch pre-push hook stopped working after v4.15.0. The hook passes the literal .. as a single argv element. Before #1941 the surrounding sh...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git
octolytics-dimension-user_id62252524
octolytics-dimension-user_logincommitizen-tools
octolytics-dimension-repository_id106127589
octolytics-dimension-repository_nwocommitizen-tools/commitizen
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id106127589
octolytics-dimension-repository_network_root_nwocommitizen-tools/commitizen
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
released9dd20d38f8ae3c4cb6b597807431db300d0bd2a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/commitizen-tools/commitizen/pull/2005/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fpull%2F2005%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fpull%2F2005%2Ffiles
Sign up https://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=commitizen-tools%2Fcommitizen
Reloadhttps://github.com/commitizen-tools/commitizen/pull/2005/files
Reloadhttps://github.com/commitizen-tools/commitizen/pull/2005/files
Reloadhttps://github.com/commitizen-tools/commitizen/pull/2005/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/2005/files
commitizen-tools https://github.com/commitizen-tools
commitizenhttps://github.com/commitizen-tools/commitizen
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/2005/files
Notifications https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Fork 344 https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Star 3.5k https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Code https://github.com/commitizen-tools/commitizen
Issues 116 https://github.com/commitizen-tools/commitizen/issues
Pull requests 45 https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality 0 https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
Code https://github.com/commitizen-tools/commitizen
Issues https://github.com/commitizen-tools/commitizen/issues
Pull requests https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fcommitizen-tools%2Fcommitizen%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen%2Fissues%2Fnew%2Fchoose
bearomorphismhttps://github.com/bearomorphism
masterhttps://github.com/commitizen-tools/commitizen/tree/master
fix/2003-rev-range-env-expansionhttps://github.com/commitizen-tools/commitizen/tree/fix/2003-rev-range-env-expansion
Conversation 4 https://github.com/commitizen-tools/commitizen/pull/2005
Commits 1 https://github.com/commitizen-tools/commitizen/pull/2005/commits
Checks 21 https://github.com/commitizen-tools/commitizen/pull/2005/checks
Files changed https://github.com/commitizen-tools/commitizen/pull/2005/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/2005/files
fix(check): expand env vars in --rev-range https://github.com/commitizen-tools/commitizen/pull/2005/files#top
Show all changes 1 commit https://github.com/commitizen-tools/commitizen/pull/2005/files
2a3213e fix(check): expand env vars in --rev-range bearomorphism May 30, 2026 https://github.com/commitizen-tools/commitizen/pull/2005/commits/2a3213e239036bf39e345fba0737e041add20f14
Clear filters https://github.com/commitizen-tools/commitizen/pull/2005/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/2005/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/2005/files
check.py https://github.com/commitizen-tools/commitizen/pull/2005/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
test_check_command.py https://github.com/commitizen-tools/commitizen/pull/2005/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
commitizen/commands/check.pyhttps://github.com/commitizen-tools/commitizen/pull/2005/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
View file https://github.com/commitizen-tools/commitizen/blob/2a3213e239036bf39e345fba0737e041add20f14/commitizen/commands/check.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/2005/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/2005/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
https://github.com/commitizen-tools/commitizen/pull/2005/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
https://github.com/commitizen-tools/commitizen/pull/2005/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
tests/commands/test_check_command.pyhttps://github.com/commitizen-tools/commitizen/pull/2005/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
View file https://github.com/commitizen-tools/commitizen/blob/2a3213e239036bf39e345fba0737e041add20f14/tests/commands/test_check_command.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/2005/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/2005/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
https://github.com/commitizen-tools/commitizen/pull/2005/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
https://github.com/commitizen-tools/commitizen/pull/2005/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
https://github.com/commitizen-tools/commitizen/pull/2005/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
https://github.com/commitizen-tools/commitizen/pull/2005/files#diff-7b8c8b76ce1d42b29a8318f7447acfcaf7565dd871c3427bfaf69f70f700b836
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/2005/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

Viewport: width=device-width


URLs of crawlers that visited me.