repository.c: replace hold_locked_index() with repo_hold_locked_index()