]> git.ozlabs.org Git - next-scripts/commitdiff
set branches based on "branch" points in the control file
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 1 Jun 2018 04:47:54 +0000 (14:47 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 1 Jun 2018 04:47:54 +0000 (14:47 +1000)
do_merge
make_tree_file

index 829340135074150ea93ccb6a35fd7993fe1a6dfb..5aa414a42113f6dfa15e38497aeb07b5437866df 100755 (executable)
--- a/do_merge
+++ b/do_merge
@@ -91,13 +91,18 @@ do_rebase()
 
 }
 
-heads=$(grep -v '^#' "$CTRL_FILE" | awk -F '\t' '$2=="quilt" || $2=="git" { printf("%s/%s ", $3, $5); }')
+heads=$(grep -v '^#' "$CTRL_FILE" | awk -F '\t' '$2=="quilt" || $2=="git" { printf("%s/%s ", $3, $5); } $2=="branch" { printf("branch/%s ", $1); }')
 
 need_build=false
 
 for h in $heads; do
        tree=${h%%/*}
 
+       [ "$tree" = "branch" ] && {
+               git branch -f "${h#branch/}"
+               continue
+       }
+
        [ -n "$start_from" ] && {
                if [ "$tree" = "$start_from" ]; then
                        start_from=""
index 7e5d682cd4e58b662ad00e92ac55742de0bdbfca..c144ccc59980e77fe6505b767300a1aa06bc0c6f 100755 (executable)
@@ -30,6 +30,7 @@ mkdir Next
        IFS='   '
        grep -v '^#' $CTRL_FILE |
                while read email type name url ref build; do
+                       [ "$type" = "branch" ] && continue
                        tab="\t"
                        [ ${#name} -le 8 ] && tab="\t\t"
                        [ "$type" = "git" ] && url="$url#${ref##*:}"