refs.c: lock_ref_sha1_basic is used for all refs