Commit 88d1d37b authored by Vitaly Lipatov's avatar Vitaly Lipatov

checkout_bpbranch: fix initial fetching branch

parent 8bd0e67a
...@@ -62,6 +62,10 @@ checkout_bpbranch() ...@@ -62,6 +62,10 @@ checkout_bpbranch()
# Create branch if not exist yet # Create branch if not exist yet
if is_exist_branch $USEBRANCH ; then if is_exist_branch $USEBRANCH ; then
docmd git checkout $USEBRANCH || fatal "Can't checkout branch $USEBRANCH. Use $BPSPEC manually or remove it." docmd git checkout $USEBRANCH || fatal "Can't checkout branch $USEBRANCH. Use $BPSPEC manually or remove it."
if ! git branch -a | grep -q "remotes/$PGEAR/" ; then
docmd gremote $GIRARHOST -o
docmd git fetch $PGEAR $USEBRANCH
fi
# if we successful with gear # if we successful with gear
if git branch -a | grep -q "remotes/$PGEAR/$USEBRANCH" ; then if git branch -a | grep -q "remotes/$PGEAR/$USEBRANCH" ; then
docmd git fetch $PGEAR $USEBRANCH docmd git fetch $PGEAR $USEBRANCH
...@@ -72,7 +76,7 @@ checkout_bpbranch() ...@@ -72,7 +76,7 @@ checkout_bpbranch()
if ! git branch -a | grep -q "remotes/$PGEAR/$USEBRANCH" ; then if ! git branch -a | grep -q "remotes/$PGEAR/$USEBRANCH" ; then
# if we have no fetched branch # if we have no fetched branch
docmd gremote $GIRARHOST -o docmd gremote $GIRARHOST -o
docmd git fetch $PGEAR docmd git fetch $PGEAR $USEBRANCH
fi fi
# if we successful with gear # if we successful with gear
if git branch -a | grep -q "remotes/$PGEAR/$USEBRANCH" ; then if git branch -a | grep -q "remotes/$PGEAR/$USEBRANCH" ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment