If the SHA that is requested doesn't exist on the branch (bug 8195) the reset fails but the build continues. It then ends up building random content. The git checkout step should check for failure at every step, and a failure should mean that the build is aborted as a bad fetch means we can't build.
e.g. https://autobuilder.yoctoproject.org/main/builders/nightly-deb/builds/436/steps/Git%20checkout%20of%20poky/logs/stdio
Richard has already added some code, please verify and close these based on those changes
http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder/commit/?id=77af111ea86b0423c28371c83d326b8f6b782e39
Verified.