resolve refs to shas