Git shallow clone followed by checkout -cf $hash fails my build



What happened here: I made some changes to my GitHub repo and pushed it. Minutes after, I went back and updated the README and pushed again.

Then I’ve got this error on my build:

I believe what’s happening is that the shallow clone, depth=1, only has my latest (head) commit bcd91 and not the previous, dd7488, which is the changeset being tested.

The subsequent build for bcd91 worked just fine, as expected:

There may be some intermittent issue where people push too fast and their tests fail.


This is explained in our document. You should really define a value higher than 1 for the depth.