From 82225ac5a15ccdd12d629a9920c0f206d6552ebc Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Wed, 3 Jul 2024 12:43:00 +0300 Subject: [PATCH] mk_format_patch: Copy only those patches that have changes in chunks --- tools/mk_format_patch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/mk_format_patch b/tools/mk_format_patch index b8b2991d0..d34ecbf9e 100755 --- a/tools/mk_format_patch +++ b/tools/mk_format_patch @@ -25,10 +25,17 @@ ii_cp() local new_p=$1 local old_p=$2 + # Patches can be extracted in several ways. + # Copy only those patches that have changes in chunks, + # line numbers, or source text. + # Ignore lines that may be changed by another method + # of extracting (creating) the patch. if [ "$(diff -N \ --ignore-matching-lines="^From [0-9a-f]\{40\}" \ --ignore-matching-lines="^index [0-9a-f]\{7\}" \ --ignore-matching-lines="^Subject:" \ + --ignore-matching-lines='/.*/* |[ ][ 1-9]' \ + --ignore-matching-lines='^Armbian$' \ --ignore-matching-lines="^[2-3].[1-9][0-9]" \ $old_p $new_p 2>/dev/null)" != "" ] then @@ -170,7 +177,7 @@ then prefix="" $(git -C $url_t \ - format-patch --filename-max-length=75 $range \ + format-patch --filename-max-length=75 --abbrev=12 $range \ -o $tmp_dir/$target_name ) 2>/dev/null