git://git.jankratochvil.net
/
nethome.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dashtopatch: Default origin: gdb->origin
[nethome.git]
/
bin
/
dashtopatch
diff --git
a/bin/dashtopatch
b/bin/dashtopatch
index
c48fad6
..
901db5a
100755
(executable)
--- a/
bin/dashtopatch
+++ b/
bin/dashtopatch
@@
-5,33
+5,39
@@
if [ "$1" = -c ];then
compile=true
shift
fi
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
echo >&2 "Syntax: $0 branch-list-delimited-by-dashes"
exit 1
fi
-base="gdb/master"
+if [ -f origin ];then
+ origin="`cat origin`"
+else
+ origin="origin/master"
+fi
+base=$origin
gerrit=true
if git branch -D gerrit;then
gerrit=true
if git branch -D gerrit;then
- git checkout
gdb/master
+ git checkout
$origin
git checkout -b gerrit
else
gerrit=false
fi
for elem in $(echo "$1"|tr '-' ' ');do
git checkout -b gerrit
else
gerrit=false
fi
for elem in $(echo "$1"|tr '-' ' ');do
- if [ "$base" =
"gdb/master"
];then
+ if [ "$base" =
$origin
];then
next="$elem"
else
next="$base-$elem"
fi
git checkout "$next"
next="$elem"
else
next="$base-$elem"
fi
git checkout "$next"
- git merge "$base"
+ git merge
--no-edit
"$base"
if $compile;then
make
fi
if [ -e "$next".patch ];then
echo -e '/^--- /,$d\nw'|ed "$next".patch || :
fi
if $compile;then
make
fi
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
if $gerrit;then
cp "$next".patch dashtopatch.patch
echo -e '/^--- /,$d\nw'|ed dashtopatch.patch