X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=bin%2Fdashtopatch;h=717c5cc275a632f398b5ca4b2d824af350310124;hp=c48fad673de0d7cca62202f51d3da39298c546b0;hb=b8be1b96db19decef6b6b1de6115aa7c5b50bb18;hpb=17d22308f54d26acd815fb0887110ad83f0d7437 diff --git a/bin/dashtopatch b/bin/dashtopatch index c48fad6..717c5cc 100755 --- a/bin/dashtopatch +++ b/bin/dashtopatch @@ -9,22 +9,27 @@ if [ $# != 1 ] || ! echo "$1" | grep -q '-';then echo >&2 "Syntax: $0 branch-list-delimited-by-dashes" exit 1 fi -base="gdb/master" +if [ -f origin ];then + origin="`cat origin`" +else + origin="gdb/master" +fi +base=$origin 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 - if [ "$base" = "gdb/master" ];then + if [ "$base" = $origin ];then next="$elem" else next="$base-$elem" fi git checkout "$next" - git merge "$base" + git merge --no-edit "$base" if $compile;then make fi