From 84469e1b6fb553b2125bbd6cfe2370c6adede99b Mon Sep 17 00:00:00 2001 From: Cruz Monrreal II Date: Thu, 10 Jan 2019 22:28:51 -0600 Subject: [PATCH] Corrected simplified astyle job behavior when base branch is not master Consolidated efforts from PR #9336. Previous job's env vars would not be populated correctly if the base branch of a PR was not master. Corected by pulling remaining respository information to perform comparison between read-only instance of PR and base branch. --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b54d9e5fe4..08d3f3fc1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -144,9 +144,12 @@ matrix: export PATH=$PWD/bin:$PATH; cd - - astyle --version + # Fetch remaining information needed for branch comparison + - git fetch --all --unshallow --tags + - git fetch origin "${TRAVIS_BRANCH}" script: - >- - git diff --name-only --diff-filter=d HEAD..${TRAVIS_BRANCH} \ + git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \ | ( grep '.\(c\|cpp\|h\|hpp\)$' || true ) \ | ( fgrep -v -f .astyleignore || true ) \ | while read file; do astyle -n --options=.astylerc "${file}"; done