aboutsummaryrefslogtreecommitdiffstats
path: root/git-format-named-patches.sh
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-04-04 10:21:42 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-10-07 11:02:09 +0200
commit02a8a8f74ff759bac641f38df5ad26307c7ba87d (patch)
tree69b4752659b6a7c811798025cd117390a1e3bdba /git-format-named-patches.sh
parentb199083197af6d404f9cab31658ae243caedea65 (diff)
downloadgosc-02a8a8f74ff759bac641f38df5ad26307c7ba87d.tar.gz
fix(git-format-named-patches): isolate trailers by git interpret-trailers
Diffstat (limited to 'git-format-named-patches.sh')
-rwxr-xr-xgit-format-named-patches.sh2
1 files changed, 1 insertions, 1 deletions
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