diff options
Diffstat (limited to 't/helper/test-write-cache.c')
-rw-r--r-- | t/helper/test-write-cache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/t/helper/test-write-cache.c b/t/helper/test-write-cache.c index 8837717d36..66287d6d47 100644 --- a/t/helper/test-write-cache.c +++ b/t/helper/test-write-cache.c @@ -9,9 +9,10 @@ int cmd__write_cache(int argc, const char **argv) if (argc == 2) cnt = strtol(argv[1], NULL, 0); setup_git_directory(); - read_cache(); + repo_read_index(the_repository); for (i = 0; i < cnt; i++) { - hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR); + repo_hold_locked_index(the_repository, &index_lock, + LOCK_DIE_ON_ERROR); if (write_locked_index(&the_index, &index_lock, COMMIT_LOCK)) die("unable to write index file"); } |