for the past several miles their route had taken them upwards towards a pass that permitted entrance into the expansive california san joaquin valley , which ran for hundreds of miles from north to south .