quilt: allow less fuzz when applying patches quilt-less-allowed-fuzz
authorJonas Gorski <jonas.gorski@gmail.com>
Wed, 19 Dec 2018 23:06:48 +0000 (00:06 +0100)
committerJonas Gorski <jonas.gorski@gmail.com>
Tue, 1 Jan 2019 17:29:30 +0000 (18:29 +0100)
Allowing patches to apply with a fuzz of 2 can lead to patches being
applied to similar, but wrong locations, especially if the context is
mostly syntax with braces.

Reduce the allowd fuzz to 1 to make it easier to catch those cases.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
include/quilt.mk

index 61dcc7964cf4315727264d21d00bf186345dfb79..930a5aa306a1115658da968531e3ecf3458ccae2 100644 (file)
@@ -143,7 +143,7 @@ define Quilt/Template
        if [ -s "$(1)/patches/series" ]; then \
                (cd "$(1)"; \
                        if $(QUILT_CMD) next >/dev/null 2>&1; then \
-                               $(QUILT_CMD) push -a; \
+                               $(QUILT_CMD) push --fuzz=1 -a; \
                        else \
                                $(QUILT_CMD) top >/dev/null 2>&1; \
                        fi \
@@ -168,7 +168,7 @@ define Quilt/Template
 
   $(3)refresh: $(3)quilt-check
        @cd "$(1)"; $(QUILT_CMD) pop -a -f >/dev/null 2>/dev/null
-       @cd "$(1)"; while $(QUILT_CMD) next 2>/dev/null >/dev/null && $(QUILT_CMD) push; do \
+       @cd "$(1)"; while $(QUILT_CMD) next 2>/dev/null >/dev/null && $(QUILT_CMD) push --fuzz=1; do \
                QUILT_DIFF_OPTS="-p" $(QUILT_CMD) refresh -p ab --no-index --no-timestamps; \
        done; ! $(QUILT_CMD) next 2>/dev/null >/dev/null
        $(Quilt/Refresh/$(4))