From 2e2d41c6bae5b01774ffc793f650e762fe297561 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 5 Apr 2010 13:48:23 +0200 Subject: [PATCH] "branch" command: always branch off master, not off HEAD, unless a branch is specified --- all | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/all b/all index 72601766..c94d71b3 100755 --- a/all +++ b/all @@ -198,10 +198,14 @@ case "$cmd" in branch) remote=$1 branch=$2 + srcbranch=$3 if [ -z "$branch" ]; then branch=$remote remote=origin fi + if [ -z "$srcbranch" ]; then + srcbranch=master + fi if [ -z "$branch" ]; then for d in $repos; do enter "$d0/$d" @@ -220,7 +224,7 @@ case "$cmd" in read -r a done if [ x"$a" = x"y" ]; then - verbose git push "$remote" HEAD:"$branch" + verbose git push "$remote" "$srcbranch":"$branch" verbose git checkout --track -b "$branch" "$remote/$branch" fi cd "$d0" @@ -344,6 +348,7 @@ case "$cmd" in echo " $SELF push" echo " $SELF branches" echo " $SELF branch [] " + echo " $SELF branch " echo " $SELF checkout [] " echo " $SELF compile" echo " $SELF run " -- 2.39.2