8 if [ $# != 1 ] || ! echo "$1" | grep -q '-';then
9 echo >&2 "Syntax: $0 branch-list-delimited-by-dashes"
19 if git branch -D gerrit;then
21 git checkout -b gerrit
25 for elem in $(echo "$1"|tr '-' ' ');do
26 if [ "$base" = $origin ];then
32 git merge --no-edit "$base"
36 if [ -e "$next".patch ];then
37 echo -e '/^--- /,$d\nw'|ed "$next".patch || :
39 git diff "$base" "$next"|diffdecvs >>"$next".patch
41 cp "$next".patch dashtopatch.patch
42 echo -e '/^--- /,$d\nw'|ed dashtopatch.patch
44 patch -p1 <"$next".patch
45 git commit -a -F dashtopatch.patch
46 rm -f dashtopatch.patch