From 92b9fbf85ca4b42fc0024208f088a3b4c39597c2 Mon Sep 17 00:00:00 2001 From: Oneric Date: Mon, 14 Oct 2024 00:19:43 +0200 Subject: [PATCH] make: always git reset on patch renewal If a patch changed inbetween application and reversal changed/remove parts might persist otherwise --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 42d4df0..b904f75 100644 --- a/Makefile +++ b/Makefile @@ -38,9 +38,11 @@ patch: patch.stamp patch.stamp: submodule.stamp patches/series $(wildcard patches/*.patch) @echo "Applying patches" @# `pop -a` return 2 if currently no patches applied, thus ignore exit code - @cd $(SUBMODULE_NAME) && \ - $(QUILT) pop -qfa; \ - $(QUILT) push -a + @cd $(SUBMODULE_NAME) && { \ + $(QUILT) pop -qfa; \ + git reset --hard && \ + $(QUILT) push -a; \ + } @touch $@