9 echo >&2 "Syntax: $0 branch-list-delimited-by-dashes"
15 origin="origin/master"
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 [ "$origin" != "master" ];then
37 if [ -e "$next".patch ];then
38 echo -e '/^--- /,$d\nw'|ed "$next".patch || :
40 git diff "$base" "$next" --|diffdecvs >>"$next".patch
41 git diff -U9999999 --binary "$base" "$next" -- >"$next".Upatch
44 cp "$next".patch dashtopatch.patch
45 echo -e '/^--- /,$d\nw'|ed dashtopatch.patch
47 patch -p1 <"$next".patch
48 git commit -a -F dashtopatch.patch
49 rm -f dashtopatch.patch