Skip to content

Commit c3077d2

Browse files
authored
Merge pull request #9346 from cmonr/astyle_in_branch-fix
Travis CI: Corrected astyle job behavior with non-master base branch PRs
2 parents 28d5477 + 84469e1 commit c3077d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,12 @@ matrix:
144144
export PATH=$PWD/bin:$PATH;
145145
cd -
146146
- astyle --version
147+
# Fetch remaining information needed for branch comparison
148+
- git fetch --all --unshallow --tags
149+
- git fetch origin "${TRAVIS_BRANCH}"
147150
script:
148151
- >-
149-
git diff --name-only --diff-filter=d HEAD..${TRAVIS_BRANCH} \
152+
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
150153
| ( grep '.\(c\|cpp\|h\|hpp\)$' || true ) \
151154
| ( fgrep -v -f .astyleignore || true ) \
152155
| while read file; do astyle -n --options=.astylerc "${file}"; done

0 commit comments

Comments
 (0)