refs.c: avoid git_path assignment in lock_ref_sha1_basic