diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2024-04-04 10:21:42 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-10-07 11:02:09 +0200 |
commit | 02a8a8f74ff759bac641f38df5ad26307c7ba87d (patch) | |
tree | 69b4752659b6a7c811798025cd117390a1e3bdba /git-format-named-patches.sh | |
parent | b199083197af6d404f9cab31658ae243caedea65 (diff) | |
download | gosc-02a8a8f74ff759bac641f38df5ad26307c7ba87d.tar.gz |
fix(git-format-named-patches): isolate trailers by git interpret-trailers
Diffstat (limited to 'git-format-named-patches.sh')
-rwxr-xr-x | git-format-named-patches.sh | 2 |
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 |