From fad510f69e11eaee4e3b52493a9e3641320afbb5 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sun, 4 Oct 2026 14:14:17 +0200 Subject: [PATCH] [FIX] pre-commit: do not strip trailing whitespace from patches The blank context lines of a diff are a single space: stripping it breaks pos_payment_method_cashdro_fix/upstream/*.patch. Co-Authored-By: Claude Opus 5.5 --- .pre-commit-config.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 946f57c..ca2cf1f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -64,8 +64,9 @@ repos: rev: v6.0.0 hooks: - id: trailing-whitespace - # exclude autogenerated files - exclude: /README\.rst$|\.pot?$ + # exclude autogenerated files, and patches: the blank context + # lines of a diff are a single space, stripping it breaks them + exclude: /README\.rst$|\.pot?$|\.patch$ - id: end-of-file-fixer # exclude autogenerated files exclude: /README\.rst$|\.pot?$