Buildbot fails to perform any builds because it attempts to check out
a ref (referencing a commit) using git clone's `-b' switch, which only
accepts branch references.
This commit modifies buildbot to check out the ref in a separate call
to `git checkout', which allows commit refs to be checked out.
err=0
- if ! output=$(git clone "$repository" -b "$branch" "$builddir/sources" 2>&1); then
+ if ! output=$(git clone "$repository" "$builddir/sources" 2>&1) ||
+ ! output+=$(cd "$builddir/sources" 2>&1 && git checkout "$branch" 2>&1); then
err=1
fi