You need to re set `error = GIT_ENOTFOUND`. Otherwise it's just going to skip over after it jumps.