dashtopatch: Default origin: gdb->origin
[nethome.git] / bin / dashtopatch
index 717c5cc..901db5a 100755 (executable)
@@ -5,14 +5,14 @@ if [ "$1" = -c ];then
   compile=true
   shift
 fi
-if [ $# != 1 ] || ! echo "$1" | grep -q '-';then
+if [ $# != 1 ];then
   echo >&2 "Syntax: $0 branch-list-delimited-by-dashes"
   exit 1
 fi
 if [ -f origin ];then
   origin="`cat origin`"
 else
-  origin="gdb/master"
+  origin="origin/master"
 fi
 base=$origin
 gerrit=true
@@ -36,7 +36,8 @@ for elem in $(echo "$1"|tr '-' ' ');do
   if [ -e "$next".patch ];then
     echo -e '/^--- /,$d\nw'|ed "$next".patch || :
   fi
-  git diff "$base" "$next"|diffdecvs >>"$next".patch
+  git diff                    "$base" "$next" --|diffdecvs >>"$next".patch
+  git diff -U9999999 --binary "$base" "$next" --            >"$next".Upatch
   if $gerrit;then
     cp "$next".patch dashtopatch.patch
     echo -e '/^--- /,$d\nw'|ed dashtopatch.patch