From 7858c7f3e5a861ec8a9e8e616fe4974b1211ecc9 Mon Sep 17 00:00:00 2001 From: Frederik Seiffert Date: Mon, 14 Oct 2024 12:33:57 +0200 Subject: [PATCH] Reduce required context when applying patches Makes `git apply` match `patch`'s fuzzing a bit more closely. --- scripts/common.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/common.bat b/scripts/common.bat index 2166dd8..d0c1065 100644 --- a/scripts/common.bat +++ b/scripts/common.bat @@ -64,14 +64,14 @@ exit /b %errorlevel% for /F "tokens=*" %%P in ('dir /b /s ^"%ROOT_DIR%\patches\%PROJECT%-*.patch^" 2^>nul') do ( echo. echo ### Applying %%~nxP - git apply %%P || exit /b 1 + git apply -C1 %%P || exit /b 1 ) if defined ADDITIONAL_PATCHES_DIR ( for /F "tokens=*" %%P in ('dir /b /s ^"%ADDITIONAL_PATCHES_DIR%\%PROJECT%-*.patch^" 2^>nul') do ( echo. echo ### Applying %%~nxP - git apply %%P || exit /b 1 + git apply -C1 %%P || exit /b 1 ) )