# pre-commit v4.2.0 — pre-commit v4.2.0 - Product: pre-commit (https://whatsnew.fyi/product/pre-commit) - Vendor: pre-commit - Date: 2025-03-18 - Version: v4.2.0 - Original notes: https://github.com/pre-commit/pre-commit/releases/tag/v4.2.0 - Permalink: https://whatsnew.fyi/product/pre-commit/releases/v4.2.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **added** — For language: python first attempt a versioned python executable for the default language version before consulting a potentially unversioned sys.executable - **fixed** — Handle error during conflict detection when a file is named HEAD ###### Features - For `language: python` first attempt a versioned python executable for the default language version before consulting a potentially unversioned `sys.executable`. - #3430 PR by @asottile. ###### Fixes - Handle error during conflict detection when a file is named "HEAD" - #3425 PR by @tusharsadhwani.