3 if [ $# != 1 ] || ! echo "$1" | grep -q '-';then
4 echo >&2 "Syntax: $0 branch-list-delimited-by-dashes"
9 if git branch -D gerrit;then
11 git checkout -b gerrit
15 for elem in $(echo "$1"|tr '-' ' ');do
16 if [ "$base" = "master" ];then
23 if [ -e "$next".patch ];then
24 echo -e '/^--- /,$d\nw'|ed "$next".patch || :
26 git diff "$base" "$next"|diffdecvs >>"$next".patch
28 cp "$next".patch dashtopatch.patch
29 echo -e '/^--- /,$d\nw'|ed dashtopatch.patch
31 patch -p1 <"$next".patch
32 git commit -a -F dashtopatch.patch
33 rm -f dashtopatch.patch