From 02a8a8f74ff759bac641f38df5ad26307c7ba87d Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 4 Apr 2024 10:21:42 +0200 Subject: fix(git-format-named-patches): isolate trailers by git interpret-trailers --- git-format-named-patches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-format-named-patches.sh') diff --git a/git-format-named-patches.sh b/git-format-named-patches.sh index e311f5f..a5e4f8b 100755 --- a/git-format-named-patches.sh +++ b/git-format-named-patches.sh @@ -13,7 +13,7 @@ IDSstr="$(git log --format="%H" "$1" 2>/dev/null)" mapfile -t IDS <<< "$IDSstr" for id in "${IDS[@]}" ; do PATCH="$(git format-patch -1 --stdout "${id}")" - FN="$(echo "$PATCH" | awk '/^Patch: / {print $2}')" + FN="$(echo "$PATCH" | git interpret-trailers --parse | awk '/^Patch: / {print $2}')" [ -z "$FN" ] && fail "Patch filename not defined" printf "%s" "$PATCH" > "$FN" done -- cgit