From d212cf58c9d52bffe80cd36f14dedd7dccac3be6 Mon Sep 17 00:00:00 2001 From: Oneric Date: Tue, 8 Oct 2024 04:00:07 +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 2635d69..49f493a 100644 --- a/Makefile +++ b/Makefile @@ -40,9 +40,11 @@ submodule.stamp: patch.stamp: submodule.stamp patches/series patches/000_plant-a-forest.patch $(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 $@