% git commit
[INFO] Checking merge-conflict files only.
Run Ruff on Lib/test/....................................................Passed
Run Ruff on Argument Clinic..........................(no files to check)Skipped
check for case conflicts.................................................Passed
check for merge conflicts................................................Failed
- hook id: check-merge-conflict
- exit code: 1
Doc/whatsnew/3.13.rst:1385: Merge conflict string '=======' found
check toml...........................................(no files to check)Skipped
The only solution I can think of is to remove the ===== case from the pre-commit hook and check only for <<<< and >>>>, but that might cause false negatives instead. Of course, in projects where this triggers it could also be fixed by using different RST headers.
I got this on the CPython repo:
But it's an RST header, not a merge conflict (https://github.com/python/cpython/blob/2326d6c868e300a814179d77fc308fec8365cb8c/Doc/whatsnew/3.13.rst?plain=1#L1383).
The only solution I can think of is to remove the
=====
case from the pre-commit hook and check only for<<<<
and>>>>
, but that might cause false negatives instead. Of course, in projects where this triggers it could also be fixed by using different RST headers.