diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-12-10 15:42:05 +0100 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-12-13 09:29:27 -0500 |
commit | 05b2b885e803eea3701ccfa0a5544e46ef5836ff (patch) | |
tree | 110404eaa9c9aa8577e175146b67fc509ba4de16 /debian | |
parent | efd05a888928ed05e2a3279dbbcb6b630cb696a4 (diff) | |
download | vyos-cloud-init-05b2b885e803eea3701ccfa0a5544e46ef5836ff.tar.gz vyos-cloud-init-05b2b885e803eea3701ccfa0a5544e46ef5836ff.zip |
debian/cherry-pick: use git format-patch rather than git show.
This makes the patches in debian/patches/ dep3 complaint by
using git format-patch rather than 'git show'
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/cherry-pick | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/debian/cherry-pick b/debian/cherry-pick index 0ba2f19d..4906917f 100755 --- a/debian/cherry-pick +++ b/debian/cherry-pick @@ -50,23 +50,30 @@ print_bugs() { } git_log_to_dch() { + # call printer with subject, author and bugs as extracted + # from either git format-patch output or git show output. local line="" commit="" lcommit="" bugs="" local printer="${1:-print_commit}" while :; do read line || break case "$line" in - commit\ *) + commit\ *|From\ *) if [ -n "$commit" ]; then "$printer" "$subject" "$author" "$bugs" fi - commit=${line#*: } + commit=${line#* } + commit=${commit%% *} bugs="" author="" subject="" ;; - Author:*) author="${line#Author: }";; + Author:\ *|From:\ *) author="${line#*: }";; LP:*) bugs="${bugs:+${bugs}, }${line#*: }";; "") [ -z "$subject" ] && read subject;; + Subject:\ *) + subject="${line#Subject: }" + subject="${subject#\[PATCH\] }" + ;; esac done if [ -n "$commit" ]; then @@ -140,8 +147,8 @@ main() { fi fi - git show --no-decorate "$chash" > "$fpath" || - { error "failed git show $chash > $fpath"; return 1; } + git format-patch --stdout -1 "$chash" > "$fpath" || + { error "failed git format-patch -1 $chash > $fpath"; return 1; } echo "$fname" >> "$series" || { error "failed to write to $series"; return 1; } |