Travis CI build on python/cpython passes in error

I don't know if this is specific to my pull request but on PR #2558 I'm seeing:
fatal: Invalid symmetric difference expression 49f6449ef4b81537c19b82329caaf60596c516c2...7b634956246bc6112a16ba11ff9f721342e750e6 <>Only docs were updated, stopping build process.
The build is subsequently marked as green. This is invalid, there were code changes in the pull request.
- Ł

The Travis CI config runs the command:
git diff --name-only 49f6449ef4b81537c19b82329caaf60596c516c2...d0c822cded495409b68432fa10f9573417ca1fb7
Git fails with "fatal: Invalid symmetric difference expression (...)" if it doesn't know one or both sha1.
The first problem is that 49f6449ef4b81537c19b82329caaf60596c516c2 is "old" (Date: Sun Jul 16 07:29:16 2017), whereas Travis CI only gets the 50 latest commits:
git clone --depth=50 https://github.com/python/cpython.git python/cpython
I tested: 50 is not enough to get this commit.
haypo@selma$ git clone --depth=50 https://github.com/python/cpython.git python/cpython haypo@selma$ cd python/cpython/ haypo@selma$ git show 49f6449ef4b81537c19b82329caaf60596c516c2 fatal: bad object 49f6449ef4b81537c19b82329caaf60596c516c2
If "git diff" fails, we should simply run all tests.
Victor
participants (2)
-
Lukasz Langa
-
Victor Stinner