build,travis: build only last commit in a branch build
This started out as me trying to fix my Python build
in a local Travis CI env.
After 40+ minutes, the build still did not stop:
https://travis-ci.org/commodo/packages/builds/310413628
There is a bug, where the `.travis_do.sh` script does exit early,
and enters an endless loop, when doing a branch build.
It tries to continuously fetch 50 more revisions.
So, I decided to add some limited support for branch builds.
This also allows a simpler testing with Travis before
opening a PR.
This scope of testing is limited to whatever the last
commit touches, but it's still better than nothing.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>