]> git.ozlabs.org Git - next-scripts/blobdiff - do_merge
set branches based on "branch" points in the control file
[next-scripts] / do_merge
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=""