3 fail () { echo >&2 "$0: $*"; exit 1; }
5 # does `gbp pq export' (leaving us on BRANCH (eg "quilt-tip"))
6 # commits the resulting debian/patches on qc/BRANCH
7 # goes back to patch-queue/BRANCH
8 # qc/BRANCH is not fast-forwarding
12 branch=`git symbolic-ref HEAD`
13 branch=${branch#refs/heads/}
16 */*) fail "unexpected branch $branch" ;;
19 git branch -f qc/$branch
20 git checkout qc/$branch
21 git add debian/patches
22 git commit -m 'Commit patch queue'
23 git checkout patch-queue/$branch