| #!/bin/bash -eu | |
| SCRIPTS="$(dirname "$0")" | |
| . "$SCRIPTS"/lsq-defs | |
| export GIT_DIR="$UPSTREAM_GIT/.git" | |
| queue="$(get_queue $1)" | |
| shift | |
| for commit in "$@"; do | |
| read patch rest < <("$SCRIPTS"/git-format-patch-for-backport --no-signature --subject-prefix='' $commit -1) | |
| "$SCRIPTS"/signoff-patch "$patch" | |
| # Can't use quilt import here because we're adding to the end | |
| mv "$patch" "$queue/" | |
| patch="$(rename-patch "$queue/$patch")" | |
| echo "Adding $commit as $patch" | |
| echo "$(basename "$patch")" >> "$queue/series" | |
| done |