Just always take the first commit returned on the master branch

Some repos have multiple first master commits due to force-pushes.
Without this, that would crash upon branching for those packages.

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2015-02-25 10:50:18 +00:00
parent f55195a92f
commit 54097dc186

View file

@ -147,7 +147,7 @@ for NAME in $PACKAGES ; do
#}
[ $VERBOSE -gt 0 ] && echo "Creating $NAME $BRANCH from $NAME ..."
$(pushd $GITROOT/$NAME.git >/dev/null && \
git branch --no-track $BRANCH `git rev-list --max-parents=0 master` && \
git branch --no-track $BRANCH `git rev-list --max-parents=0 master | head -1` && \
popd >/dev/null) || {
echo "ERROR: Branch $NAME $BRANCH could not be created" >&2
popd >/dev/null