Commit cb6627fc authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmgp: fix get remote branches and main branch selecting

parent ce56305f
...@@ -241,10 +241,10 @@ if [ -n "$CLONEGIT" ] ; then ...@@ -241,10 +241,10 @@ if [ -n "$CLONEGIT" ] ; then
git clone git.alt:packages/$PKGNAME.git git clone git.alt:packages/$PKGNAME.git
if cd $PKGNAME ; then if cd $PKGNAME ; then
CURRENTBRANCH=$(get_current_branch) CURRENTBRANCH=$(get_current_branch)
for i in $(git branch -a | grep "remotes/origin/.*[0-9]\$") ; do for i in $(git branch -a | grep -v "/HEAD" | grep "remotes/origin/") ; do
git checkout -b $(echo $i | sed -e "s|remotes.*/||g") $i git checkout -b $(echo $i | sed -e "s|remotes.*/||g") $i
done done
git checkout $CURRENTBRANCH git checkout sisyphus || git checkout master || git checkout $CURRENTBRANCH
cd - >/dev/null cd - >/dev/null
fi fi
echo "See other repos at $GIRARHOST:" echo "See other repos at $GIRARHOST:"
......
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