X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=bin%2Fdashtopatch;fp=bin%2Fdashtopatch;h=c1776e7919a7e39f933975afb3d1689d65201442;hp=717c5cc275a632f398b5ca4b2d824af350310124;hb=5e237d2960760310b80ba965d7f2ca879db3d1e0;hpb=8234c12ef69dea9c8ccb6a352d5c88433e6f2f5f diff --git a/bin/dashtopatch b/bin/dashtopatch index 717c5cc..c1776e7 100755 --- a/bin/dashtopatch +++ b/bin/dashtopatch @@ -5,7 +5,7 @@ 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 @@ -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