From 5e5bbf4b39d9a43f2f187501719116aa66ebc4bb Mon Sep 17 00:00:00 2001 From: Jonathan Gold Date: Sat, 18 Nov 2017 18:44:12 -0500 Subject: [PATCH] travis: Allow travis builds to access target branches Because travis builds only fetch a single branch (master) by default, test-commit-message.sh only had access to commits in the master branch. In order to fetch the correct branch for our build, we need to run 'git config remote.origin.fetch..' with the target branch's information before executing git fetch on the repo in before_install. Now git will always fetch the appropriate branch. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 099cbede..3e0f68dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ sudo: true dist: trusty before_install: - sudo apt update + - git config remote.origin.fetch +refs/heads/${TRAVIS_BRANCH}:refs/remotes/origin/${TRAVIS_BRANCH} - git fetch --unshallow install: 'make deps' script: 'make test'